Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I view the Java Log?

Tags:

java

logging

I have a jsp project where I using the java.util.logging.Logger class to log information. At the moment my code is logging exceptions using this class, however, i would like to view the data written this log. How do I do that?

like image 687
Yo Momma Avatar asked Jan 19 '23 07:01

Yo Momma


2 Answers

It depends how your logging is set up.

In general, it will either be in your server log (for example, for Tomcat, they're in the Tomcat home directory under the logs directory), or in a file that's been configured for the app.

like image 113
Dave Newton Avatar answered Jan 20 '23 21:01

Dave Newton


You will need to configure the logging output to write into a file (or the console). You can then tail the file to keep up-to-date.

See these tutorials on configuration : writing a log file, configuring java logging

like image 20
kostja Avatar answered Jan 20 '23 22:01

kostja