read .properties file using slf4j

前端 未结 3 1729
南笙
南笙 2021-01-05 23:39

I want to read data from .properties file using slf4j,T i am able to output the data on console but what i want is to output the data on some file so i need file Appender fo

3条回答
  •  渐次进展
    2021-01-05 23:48

    slf4j is an API - if you consider it to consist only of interfaces and no classes, you are not far off.

    The behavior you need is in the implementation of the interfaces, which for slf4j may be logback, AVSL, JDK14 (java.util.logging), log4j or Simple. Some can read properties, some cannot.

    For logback you can use

    
    

    See http://logback.qos.ch/manual/configuration.html#definingProps for details.

提交回复
热议问题