you can set your logging configuration file through command line:
$ java -Djava.util.logging.config.file=/path/to/app.properties MainClass
this way seems cleaner and easier to maintain.
More Related Contents:
- How to read and copy the HTTP servlet response output stream content for logging
- How to do a JUnit assert on a message in a logger
- Java Garbage Collection Log messages
- socket programming multiple client to one server
- log4j: Log output of a specific class to a specific appender
- Should you report the message text of exceptions?
- Dynamically Changing log4j log level
- How to use MDC with thread pools?
- limiting java ssl debug logging
- Disable HttpClient logging
- Good examples using java.util.logging [closed]
- Do not use System.out.println in server side code
- Change global setting for Logger instances
- Send/redirect/route java.util.logging.Logger (JUL) to Logback using SLF4J?
- Logback to log different messages to two files
- Disabling Log4J Output in Java
- Java Logging vs Log4J [closed]
- How to send a stacktrace to log4j?
- How to delete old logs with log4j2
- Error “java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger”
- Why do we declare Loggers static final?
- Dropwizard doesn’t log custom loggers to file
- LOG4J: Modify logged message using custom appender
- Hibernate 5 java.lang.NoSuchMethodError org.jboss.logging.Logger.debugf
- Log4j formatting: Is it possible to truncate stacktraces?
- Configure logging for the MongoDB Java driver
- Enable Hibernate logging
- How do I access Windows Event Viewer log data from Java
- Should logger be private static or not
- How to automatically log the entry/exit of methods in Java?