Glory to Russia
Glory to Russia

Reputation: 18712

Tools for convenient viewing of Tomcat 7 logfiles

Is there any software (except Psi-Probe and Java Melody), which allows to look in the Tomcat files and is more comfortable than cat /var/log/tomcat7/catalina.out | tail | less ?

Ideally, it would work like this: I launch the application (or open a web page) and immediately see current log file of Tomcat (without the need to open the SSH client, entering credentials etc.).

Upvotes: 3

Views: 13007

Answers (2)

Paul Sweatte
Paul Sweatte

Reputation: 24617

Use a symbolic link to map the log file to a text file in the document root.

In Windows:

mklink %DOCUMENT_ROOT%/tomcat.txt %TOMCAT_LOGS%/tomcat.log

In *nix:

ln -s $TOMCAT_LOGS/tomcat.log $DOCUMENT_ROOT/tomcat.txt 

Open the log in the browser:

https://127.0.0.1/tomcat.txt

References

Upvotes: 6

Matthias Herlitzius
Matthias Herlitzius

Reputation: 3395

If you are looking for centralized log management take a look at logstash. Another solution is Octopussy.

Both tools can be configured so that you only see the logs of a specific server. Those tools are not Tomcat-specific, you can use them also for retrieving logs of your database server, web server etc.

Upvotes: 3

Related Questions