howachen@gmail.com schrieb:
> is it possible to use a single logger, but log different level of
> message into different file, such as info.txt, fatal.txt, error.txt?
You can do that if you include a org.apache.log4j.varia.LevelMatchFilter
into the appender defiition.
If you search "LevelMatchFilter" in GoogleGroups you can find several
examples how to use this filter.
Jan
howachen@gmail.com - 16 Jul 2006 05:01 GMT
Jan Peter Stotz
> howachen@gmail.com schrieb:
>
[quoted text clipped - 8 lines]
>
> Jan
in fact, i can use two loggers to log to different files, so which
approach (use of 2 loggers & fileter) is better and recommended?
thanks...
Jan Peter Stotz - 16 Jul 2006 11:11 GMT
howachen@gmail.com schrieb:
> in fact, i can use two loggers to log to different files, so which
> approach (use of 2 loggers & fileter) is better and recommended?
Better then what? I do not see what you are comparing.
Jan
howachen@gmail.com - 16 Jul 2006 13:45 GMT
Jan Peter Stotz
> howachen@gmail.com schrieb:
>
[quoted text clipped - 4 lines]
>
> Jan
i mean to use
1. 2 loggers for writing to 2 files
2. use filter for writing to 2 files
things such as overheads, performance, which one is better?