jbanana: Badly drawn banana (Default)
posted by [personal profile] jbanana at 03:10pm on 04/01/2011
I love logging. In many ways it's more useful than a debugger. Long ago I wrote a simple logger, and I still use it, or nowadays Java has a built-in logger, and in my experience it's fine.

But I hate Log4J. There's one straightforward reason: by default, Log4j does nothing useful. I couldn't count the times I've seen "Please initialize the Log4J system correctly" as if it were my fault. It's a logger doesn't log!

Another reason is that to specify a daily rolling log file (which is almost always what you want) requires 5 (or more) lines of configuration.

So here's a rule for writing any software. Do the simplest useful thing by default, and make the most likely use cases as simple as possible. Log4J fails on both counts.

Reply

From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Links

June

SunMonTueWedThuFriSat
            1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9 10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30