Gangmax Blog

自由之思想,独立之精神

Why There Is No Log Appending to Log File

| Comments

Today I found a program cannot append log to log file as usual, and there is no any error. I’m pretty sure I didn’t change anything about the logger configuration of the program yesterday. So weird.

So I check the change changes I made, nothing seems like related. Then I start to read the “logback-test.xml” which is used by the problem.

I see some lines:

1
2
3
4
5
6
7
8
9
10
<logger name="org.restlet.ext.httpclient.HttpClientHelper">
    <level value="WARN"/>
</logger>
<logger name="org.apache.http.headers">
    <level value="WARN"/>
</logger>
<logger name="org.apache.http.wire">
    <level value="WARN"/>
</logger>
...

And I know I removed some useless mvn dependencies which are still referred here. So I remove them from the configuration file. After doing so and rerunning the program, the log line can be appended to log file properly.

Why logback didn’t complain this problem to the programmer?

Comments