Tomcat log file / custom logs

92 views
Skip to first unread message

Toby

unread,
May 22, 2013, 6:19:12 AM5/22/13
to javamelody
Hi,

Is it possible to include non-standard location tomcat logs or custom
logs (myapp.log) in the recent log section? I couldn't find anything
obvious in the docs.

Cheers,
Toby

Vernat Emeric

unread,
May 23, 2013, 9:45:36 AM5/23/13
to javam...@googlegroups.com
Hi Toby,

JavaMelody does not read any tomcat log files or custom log files.

The logs displayed in the reports are only based on listeners for
java.util.logging and, if available, Log4J and Logback.
The listeners are registered when the webapp is started, as you can see
here:
https://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/src/main/java/net/bull/javamelody/FilterContext.java#241
So the custom logs of your webapp are in general already displayed, if
they use one of the three logging frameworks.

Note that the goal of the logs displayed is to diagnose potential issues
and how often they are, without too much volume neither overhead, and so
only the logs of the WARNING level or above are displayed in the reports.
For example, the Log4J listener is registered with a Level.WARN threshold:
https://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/src/main/java/net/bull/javamelody/Log4JAppender.java#31

bye,
Emeric


Le 22/05/2013 12:19, Toby a �crit :

Toby

unread,
May 28, 2013, 3:26:24 AM5/28/13
to javam...@googlegroups.com
Thanks, that clarifies it for me.

Cheers


On Thursday, 23 May 2013 14:45:36 UTC+1, evernat wrote:
Hi Toby,

JavaMelody does not read any tomcat log files or custom log files.

The logs displayed in the reports are only based on listeners for
java.util.logging and, if available, Log4J and Logback.
The listeners are registered when the webapp is started, as you can see
here:
https://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/src/main/java/net/bull/javamelody/FilterContext.java#241
So the custom logs of your webapp are in general already displayed, if
they use one of the three logging frameworks.

Note that the goal of the logs displayed is to diagnose potential issues
and how often they are, without too much volume neither overhead, and so
only the logs of the WARNING level or above are displayed in the reports.
For example, the Log4J listener is registered with a Level.WARN threshold:
https://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/src/main/java/net/bull/javamelody/Log4JAppender.java#31

bye,
Emeric


Le 22/05/2013 12:19, Toby a �crit :
Reply all
Reply to author
Forward
0 new messages