donaricano-btn

Configuration-with logback-test.xml or logback.xml

- logback will try to configure itself using the files logback-test.xml or logback.xml if found on the class path


1. Automatic configuration with logback-test.xml or logback.xml

1_1. configration

1_2. java

2. Automatic printing of status messages in case of warning or errors

- If warnings or errors occur during the parsing of the configuration file, logback will automatically print its internal status data on the console.

- In the absence of warnings or errors, if you still wish to inspect logback's internal status, then you can instruct logback to print status data by invoking the print() of the StatusPrinter Class


3. Status data

- Instead of invoking StatusPrinter programmatically from your code,

you can instruct the configuration file to dump status data, even in the absence of errors

- You need to set the debug attribute of the configuration file

- this debug attribute relates only to the status data

3_1. OnConsoleStatusListener

- It will go a long way in helping you diagnose logback issues. As such, enabling logback status data is very highly recommended and should be considered as a recourse of first resort

'Logging > LogBack' 카테고리의 다른 글

[LogBack] 3_4. Configuration-Syntax(1)  (0) 2016.06.14
[LogBack] 3_3. Configuration-Syntax  (0) 2016.06.03
[LogBack] 3_1. Configuration-Automatically  (0) 2016.05.31
[LogBack] 2. Architecture  (0) 2016.05.26
[LogBack] 1. Introduction  (0) 2016.05.25
블로그 이미지

리딩리드

,