Hello
Am 02.03.2011 22:47, schrieb Kannan G:
Hi
Since my application is in integration platform(Fuse) log files grow easily,
so we thought of controlling it by logging only specific number of lines
whenever exceptions are thrown. Is this possible with log4j to log specific
number of lines say 30 lines only instead entire stacktrace?
I don't know of any option for that, but you can easily write your own
appender, inheriting the one you are using at the moment.
Also i have a requirement of logging fatal errors to syslog and application
exceptions to separate file. Is this possible to let log4j categorize the
error and send to different logs? Or any standard of way of doing this.
Of course you can specify a seperate syslog appender and set the level to
FATAL. (Am I missing anything?)
The same is true for a FileAppender with a level of ERROR (or whatever level
exceptions are) - but I assume that your true problem is, that you want to
filter out all events with no Throwable attached to it?
In this case you could also writea new Filter which does just that and append
it to the FileAppender.
Best regards,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]