You may want to see all DME warnings in the web interface, except for S/MIME warnings. You do want to save the S/MIME warnings to a separate log file, however, so you can look through them at intervals. To accomplish this, you need to add a filter in the log4j
file, and specify that such warnings should not be passed on to any other filters, in the following way.
Warning: If the configuration file is not well-formed after you have edited it, or if it contains other mistakes, no information will be logged at all.
Add the following appender and logger to the file, above the <root>
system logger:
<appender name="SMIME" class="org.jboss.logging.appender.DailyRollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler" />
<param name="File" value="${jboss.server.home.dir}/log/smime.log" />
<param name="Append" value="true" />
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<param name="BufferedIO" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n" />
</layout>
</appender>
<logger name="smimeWarnings" additivity="false">
<level value="INFO" />
<appender-ref ref="SMIME" />
</logger>
The appender specifies that all that is passed to this appender should be appended to the file smime.log
. A new file is created every day. (For more information about the various parameters, there are plenty of resources on the Internet, for instance http://logging.apache.org/log4j/1.2/manual.html). The log file are by default placed in the directory ${jboss.server.home.dir}/log/
The variable is a JBoss variable, which usually resolves to /var/dme/instances/<instance>/log/
on Linux, and C:\Program Files\dme\jboss\server\default\log
on Windows servers.
The logger (can also be written as category) called smimeWarnings
refers to the SMIME
appender above, and specifies that all messages of the class smimeWarnings
(as defined in the DME code), and any subclasses, from the INFO level and up should be processed by the appender in question. additivity="false"
means that the messages will not be processed further (by the default root
logger), including the internal DME logger that writes to the Log tab in the DME web interface.