Last active
February 7, 2019 13:40
-
-
Save jonas-grgt/b941051c44da0124e00be10800436b5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.log4j.*; | |
public class LogClass { | |
private static org.apache.log4j.Logger log = Logger.getLogger(LogClass.class); | |
public static void main(String[] args) { | |
log.setLevel(Level.WARN); | |
log.trace("Trace Message!"); | |
log.debug("Debug Message!"); | |
log.info("Info Message!"); <-- not this or any of the above lines | |
log.warn("Warn Message!"); <-- will log this line | |
log.error("Error Message!"); <-- and this | |
log.fatal("Fatal Message!"); <-- and this | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment