slf4j + java.util.logging: how to configure?

后端 未结 6 932
孤独总比滥情好
孤独总比滥情好 2021-01-01 09:35

I\'m trying to use slf4j + java.util.logging. I know how to set up the Java source code to do this via logger = LoggerFactory.getLogger(...) and logger.wa

6条回答
  •  忘掉有多难
    2021-01-01 09:55

    Basically, you just need to have slf4j-api.1.7.7.jar and slf4j-jdk14.1.7.7.jar on your classpath. And then create a logging.properties file for your application and set System properties -Djava.util.logging.config.file={path_to_logging.properties}

    check this tutorial out which gives you examples how to configure slf4j with different logging frameworks such as java logger, log4j, logback etc.

提交回复
热议问题