Skip to content

Instantly share code, notes, and snippets.

@alex-ber
Last active October 6, 2019 14:44
Show Gist options
  • Save alex-ber/a9bab7e2171966b89d99a095fac27352 to your computer and use it in GitHub Desktop.
Save alex-ber/a9bab7e2171966b89d99a095fac27352 to your computer and use it in GitHub Desktop.
Log defintion example
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SomeClass {
private static final Logger log = LoggerFactory.getLogger(new Object() {
}.getClass().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