Skip to content

Instantly share code, notes, and snippets.

@alex-ber
Created October 6, 2019 14:44
Show Gist options
  • Save alex-ber/aa770ce56a7dee13d7dd403833bdc9f4 to your computer and use it in GitHub Desktop.
Save alex-ber/aa770ce56a7dee13d7dd403833bdc9f4 to your computer and use it in GitHub Desktop.
Alternative log gefintion
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SomeClass {
private static final class Local {};
private static final Logger log = LoggerFactory.getLogger(Local.class.getEnclosingClass());
public void foo(){
log.debug("foo()");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment