Question

We are running multiple tomcats instances in single box for different different applications, and we are sending logs to syslog using following lines in tomcat config.

JAVA_OPTS="$JAVA_OPTS -Dserver.syslog.host=logserver1.example.com"
JAVA_OPTS="$JAVA_OPTS -Dserver.syslog.level=WARN"

Is there anyway i can add custom tag in log file so i can log them base on per instances?

Was it helpful?

Solution

Why not to use log4j ?

You can configure log4j.properties for each instance and then choose different PatternLayout/ConversionPatterns for every instance.

You should be able to add custom tags while mentioning patterns.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top