Last active
June 11, 2023 14:49
-
-
Save ChristianOellers/7b1f42de4df1ab6bab73bdb79cba2835 to your computer and use it in GitHub Desktop.
Log4j - Example implementation (Java).
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.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
public final class Example { | |
private static final Logger logger = LoggerFactory.getLogger(Example.class); | |
public void doSomething() { | |
// Levels: info, warn, ... | |
logger.warn("Text", 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment