donaricano-btn

FirstStep


1. Requirements

- Logback-classic module requires the presence of slf4j-api.jar and logbacl-core.jar in addition to logback-classic.jar on the classpath

- Launching the HelloWorld application will output a single line on the console. By virtue of logback's default configuration policy, when no default configuration file is found, logback will add a ConsoleAppender to the root logger


- logback can report information about its internal state using a built-in status system

2. Internal state 

- logback will automatically print its internal state on the console


2_1. enable logging requirement

1) Configure the logback environment. You can do so in several more or less sophisticated ways. More on the later

2) In every class where you with to perform logging, retrieve a Logger instance by invoking the org.slf4j.LoggerFactory class' getLogger() method, passing the current class name or the class itself as a parameter

3) Use the logger instance by invoking its printing methods, namely the debug(), info(), warn()and error() methods, This will produce logging output on the configured appenders





블로그 이미지

리딩리드

,