File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Problem with log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with log4j " Watch "Problem with log4j " New topic

Problem with log4j

venkatesh loganathan

Joined: Aug 24, 2004
Posts: 14
Hi all
Iam not able to log messages to a file when i try to access log information froma file.I have a log4jconfig -- file like below

log4j.rootLogger=debug, stdout, R


# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F\:%L) - %m%n


And my program which reads this file for logging goes like this

final Logger logger = Logger.getLogger(EditShopperAction.class);
logger.debug("Here is some DEBUG");"Here is some INFO");
logger.warn("Here is some WARN");
logger.error("Here is some ERROR");
logger.fatal("Here is some FATAL");

Can someone help me in this.

Thanks in advance

Venkatesh Loganthan
I agree. Here's the link:
subject: Problem with log4j
It's not a secret anymore!