Shisoft
Shisoft

Reputation: 4245

How to logging output in console to file?

The NetBeans generate code like Logger.getLogger(svr.class.getName()).log(Level.SEVERE, null, ex); to output exception in catch.It will display in console. After I deploy my project,I cannot see any exception info.How to output those error messages to file and in console when console is available?

Thanks folks.

Upvotes: 0

Views: 5725

Answers (1)

ddewaele
ddewaele

Reputation: 22603

The logging system in NetBeans is based on the standard JDK's java.util.logging and complies to it as much as possible. In order to output error messages to a file, you can provide your own logging properties file on the classpath of your project.

See the following links for more info :

Upvotes: 3

Related Questions