I have done some Googling around it but couldn’t find any relevant information. log4j supports a bunch of log appenders, there’s documentation all over the net about ConsoleAppender and FileAppender, but there are very little or no information about appenders such as NullAppender, JDBCAppender etc. I am particularly interested about NullAppender.
<appender name="???" class="org.apache.log4j.varia.NullAppender">
<appender name="???" class="org.apache.log4j.jdbc.JDBCAppender">
Does anyone have any specific info on these? especially on the NullAppender?
I started looking here.
For the
NullAppender, there’s not a lot of doc largely because there’s nothing to configure: you can define one with<appender name="foo" class="org.apache.log4j.varia.NullAppender"/>and that’s about it. From the Javadoc:There aren’t a lot a different ways to do nothing. (It exists so that you can trash output without modifying too much of your config.)
For the
JDBCAppender, the Javadoc is here: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/jdbc/JDBCAppender.htmlThe
paramtags in the XML config correspond to setters in the Java class, but note the big red warning at the top of the Javadoc:So maybe not the best class to be relying on, given that log4j v2.0 is currently in beta, and that a cursory look over the alpha release seems to indicate that it doesn’t exist in v2.