We're using a Bea WLS 8.1. It's all bundled within my war file - the log4j-1.2.16.jar is located under WEB-INF/lib, the log4j.properties is under WEB-INF/classes.
What I don't understand is why my application affects the logging of some other apps on the application server. - Stephan -----Original Message----- From: Bender Heri [mailto:[email protected]] Sent: Tuesday, May 04, 2010 2:47 PM To: 'Log4J Users List' Subject: RE: Log4j - do only log statements for my application What application server? Where is the properties file and the log4j.jar located? Heri > -----Original Message----- > From: Huber, Stephan [mailto:[email protected]] > Sent: Tuesday, May 04, 2010 2:33 PM > To: [email protected] > Subject: Log4j - do only log statements for my application > > Hi, > > I've some questions regarding log4j. My app (war) is deployed on an > application server where multiple web-apps have also been deployed. > > Today, after analyzing the logs, I realized that my logging outputs > somehow overwrite logging statements from another application (all the > apps log to the default rotating server log file). > > Here's my configuration of log4j - log4j.properties: > log4j.rootCategory=DEBUG, CONSOLE > > ### direct log messages to console ### > log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender > log4j.appender.CONSOLE.Threshold=INFO > log4j.appender.CONSOLE.Target=System.out > log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout > log4j.appender.CONSOLE.layout.ConversionPattern=[EHS] %d{ABSOLUTE} > %-5p [%c{1}] %m%n > > ### direct messages to file material-prisma-import.log ### > #log4j.appender.file=org.apache.log4j.FileAppender > #log4j.appender.file.File=material-prisma-import.log > #log4j.appender.file.layout=org.apache.log4j.PatternLayout > #log4j.appender.file.layout.ConversionPattern=[EHS] %d{ABSOLUTE} %5p > %c{1}:%L - %m%n > > ### set log levels - for more verbose logging change 'info' to 'debug' > ### > > log4j.rootLogger=INFO, CONSOLE > > I prepend the string "[EHS]" for every logging statement of my app and > was wondering today why this string is prepended for logging > statements of another application, too. Is it because my app specifies > a root logger (so the other configuration gets overriden)? How should > my configuration look like to only log statements relevant for my > application and do not affect other applications on the same app. > server? > > Any help would be appreciated. > > Thanks and best regards, > > - Stephan --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
