jbanana: Badly drawn banana (Default)
Add MemoryShare This Entry
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.
There is 1 comment on this entry. (Reply.)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
posted by [personal profile] afuna at 05:15am on 05/01/2011
...so that's why I could never figure out how to get Log4j to work. Because it was not designed to do anything. GUH.

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