mdhtr / java-webapplication

Building a java web application step by step
0 stars 0 forks source link

Make logging configurable #7

Closed mdhtr closed 4 years ago

mdhtr commented 4 years ago

with logback

mdhtr commented 4 years ago

Logback configuration tutorial

Code for trying out log levels:

    private static void printLog() {
        log.debug("Debug Message");
        log.warn("Warn Message");
        log.error("Error Message");
        log.info("Info Message");
        log.trace("Trace Message");
    }
mdhtr commented 4 years ago

Regarding the dependencies: slf4j-simple was needed to be used with the annotation, but it's included in logback-classic, so it was removed.