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]

Reply via email to