You can configure either one of the built-in throwable renderers or provide your own. Look at tests/input/xml/throwableRenderer1.xml for an example of configuration. See org.apache.log4j.EnhancedThrowableRenderer (http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/EnhancedThrowableRenderer.html) for options.
One the second, attach the SyslogAppender to the root logger, but set the threshold on the appender to Fatal. Note: SyslogAppender uses sockets to talk with the syslog daemon. Network (even on same machine) access to the syslog is often disabled by default. On Mar 2, 2011, at 3:47 PM, Kannan G wrote: > 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? > > 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. > > Thanks. > Kann --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
