• About Us
  • Blog
  • Basket
  • Account
  • Sign In

Enable Logging

The 51Degrees Java Detector uses SLF4J for logging. The advantage of SLF4J is that it defines a basic abstraction that can be implemented differently by placing a new JAR in the classpath, making it easy to log to a file, a database or some other system.

The Detector ships with the simple logger with default settings that log to std err (short for standard error, if running in an IDE there will probably be a window displaying this at runtime). This behaviour can be modified using a properties file in your classpath.

The following should be placed in a file called simplelogger.properties and placed in your classpath. For web applications this will be in the WEB-INF/classes folder. It will record all trace logs and write them to a file called 51DegreesDetector.log. See the simplelogger properties page for more details.

# simplelogger.properties

See the SLF4J Manual for more information.

Need Help?