At the time, the Logger just offers one type of configuration: the LogLevel. The LogLevel can be set either by configuring the underlying logging platform (i.e. Log4J) or by the developer in runtime.
The following code snippet shows how to do it in runtime.
1 public class SampleLogger { 2 3 /** 4 * @param args 5 */ 6 public static void main(String[] args) { 7 ILogWrapper logger = new LogWrapperLog4JImpl("Sample logger title"); 8 9 logger.setDebugLogLevel(); 10 logger.debug("Sample log message 1..."); 11 logger.debug("Sample log message 2..."); 12 } 13 }
The code above produces the following output:
Jul 22 22:26:01,383 [main] DEBUG LogWrapperLog4JImpl - Sample log message 1... Jul 22 22:26:01,387 [main] DEBUG LogWrapperLog4JImpl - Sample log message 2...
In the future, as the need arises, there may be more configuration options added to Logger.