Nithin Satheesan
Nithin Satheesan

Reputation: 1716

Redirecting JSF errors to log file

How can I redirect all the JSF error log messages to a log file? Currently it is being written to a SystemOut.log file.

I tried to change the System.out to a custom PrintStream which will write to a log file and it is logging the system out statements to the log file. But the JSF error messages are still being written to the SystemOut.log file.

Upvotes: 2

Views: 1692

Answers (1)

BalusC
BalusC

Reputation: 1108802

Mojarra uses the java.util.logging logger. So all you need to do is to supply or change the logging.properties file in the runtime classpath. You can if necessary override/specify the properties file location using the VM argument -Djava.util.logging.config.file.

Another way is to configure it at the servletcontainer level. It's unclear which one you're using, but the exact filename SystemOut.log is typical for among others WebSphere. You can instead also just configure tracing/logging in its admin console.

Upvotes: 2

Related Questions