Skip to content

Instantly share code, notes, and snippets.

@colin-haber
Created April 28, 2012 00:43
Show Gist options
  • Save colin-haber/2514710 to your computer and use it in GitHub Desktop.
Save colin-haber/2514710 to your computer and use it in GitHub Desktop.
Any ideas why this doesn't work?
package com.n1nja;
import java.util.logging.*;
public class Test {
public static void main(String[] args) {
new Test();
}
private Logger logger = Logger.getLogger(this.getClass().getCanonicalName());
{
System.err.println("errcheck");
this.logger.addHandler(new ConsoleHandler());
this.logger.setLevel(Level.ALL);
this.logger.config("Logger level set to " + this.logger.getLevel());
System.out.println("done");
}
}
@colin-haber
Copy link
Author

"…why this doesn't work?" means "why doesn't logger.config(String) print anything?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment