-
2. Re: Why ERROR for lonely ClusteredCacheLoaders?
tylerblack Nov 17, 2006 12:32 PM (in response to tylerblack)Thank you.
-
3. Re: Why ERROR for lonely ClusteredCacheLoaders?
jbossadrian Dec 1, 2006 11:36 AM (in response to tylerblack)Is there a way to suppress the error (or this specific error) while we wait for the JBCACHE-860 ticket to be completed? Thank you in advance.
-
4. Re: Why ERROR for lonely ClusteredCacheLoaders?
tylerblack Dec 1, 2006 11:51 AM (in response to tylerblack)You can add a filter to the appropriate appenders in your log4j configuration. Something like this:
<filter class="org.apache.log4j.varia.StringMatchFilter"> <param name="StringToMatch" value="Perhaps we're alone in the cluster"/> <param name="AcceptOnMatch" value="false"/> </filter>
-
5. Re: Why ERROR for lonely ClusteredCacheLoaders?
brian.stansberry Dec 1, 2006 12:20 PM (in response to tylerblack)Cool. Didn't know there was such a thing. Can it be scoped to a category or appender?
-
6. Re: Why ERROR for lonely ClusteredCacheLoaders?
tylerblack Dec 1, 2006 12:34 PM (in response to tylerblack)We use the filter for appenders. As far as categories go, I suppose you could set the priority of "org.jboss.cache.loader.ClusteredCacheLoader" to FATAL, but that would also cut out any ERROR messages that may be worthy of attention. I'm not sure if category supports filters.
Here's an example file appender with a filter in it:<!-- A time/date based rolling appender --> <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="File" value="/var/log/jboss/server.log"/> <param name="Append" value="true"/> <!-- Rollover at midnight each day --> <param name="DatePattern" value="'.'yyyy-MM-dd"/> <!-- Rollover at the top of each hour <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/> --> <layout class="org.apache.log4j.PatternLayout"> <!-- The default pattern: Date Priority [Category] Message\n --> <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/> <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/> --> </layout> <filter class="org.apache.log4j.varia.StringMatchFilter"> <param name="StringToMatch" value="Perhaps we're alone in the cluster"/> <param name="AcceptOnMatch" value="false"/> </filter> </appender>
-
7. Re: Why ERROR for lonely ClusteredCacheLoaders?
brian.stansberry Dec 1, 2006 12:50 PM (in response to tylerblack)Thanks. If I get a chance I'll investigate the category issue.
As I think about it, filtering on category is probably not that big a deal anyway. Most likely you'd use this to remove spurious events from appenders that you're monitoring closely (e.g. the e-mail appender that wakes up the sysadmin). Such an appender probably wouldn't be getting that many log events anyway, so the overhead of the string match on each one isn't that terrible. -
8. Re: Why ERROR for lonely ClusteredCacheLoaders?
tylerblack Dec 1, 2006 12:54 PM (in response to tylerblack)That's exactly what we use it for ;)
Poor sleepless sys admins. -
9. Re: Why ERROR for lonely ClusteredCacheLoaders?
jbossadrian Dec 6, 2006 5:01 PM (in response to tylerblack)Thank you very much for y'alls suggestions! Very much appreciated.