Paul Smith skrev:
Why not simply have all the events your interested in together, in
context, in one log file? Have one File appender, and tweak the levels
to emit/silence loggers you care/don't care about? I'm personally not
sure of the advantage of seeking information across 2 log files. No
Logging event is an island by itself, it's always the context around
them that makes each one more valuable. My own personal opinion is to
only segment events into different files based on services within an
application, but I still have a main log file where all of them together
mix, giving one complete context of a running application.
> I guess my real question is your use case for considering to split
> different levels of different loggers to different files. If you can
> provide some more background as to how this would make your life easier,
> perhaps there are other features we can suggest?
I am developing an application (com.mycompany) which uses a platform/framework developed by
another company (com.othercompany) which is still not mature. When developing and debugging
I'm interested in DEBUG logging from my own applicataion, but not from the platform (it
doesn't make much sense to me, I don't have the source code and I don't want to dig into its
internal technical details). I am still interested in WARN and ERROR from the platform
though, they provide valuable context to my own logging. Moreover, the platforms DEBUG
logging is quite verbose.
However, I need to keep all DEBUG logging from the platform somewhere. If I suspect a bug in
the platform, I want to be able to send the full log along with my bug report.
More generally, my apporach is useful when an application is composed of several codebases
with different developers/maintainers and when none of these codebases are mature. Different
log files are consumed by different developers.
I have done that, and it seems to work. I'm not sure how it would
affect the performance though.
Filters can be surprisingly fast. Still, faster without them, hence
just make them all go to one file.
I'm not so worried about the performance of the actual filter. I'm more worried about that
my apporach renders isDebugEnabled() etc ineffective.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]