On Tue, Nov 4, 2014 at 6:12 PM, Brandon Darbro <bdar...@uievolution.com> wrote:
> Looking for configuration help. > > Using tomcat7 7.0.34 from rpm package tomcat7-7.0.34-3.jpp6.noarch. > > Followed the instructions for using log4j for catalina.out found here: > http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j These are instructions for using Log4j with Tomcat. It would enable you to control the files that Tomcat creates with log content. This includes files like catalina.yyyy-mm-dd.log, localhost.yyyy-mm-dd.log and other files that by default have the date in their name, however it does not allow you to control catalina.out. The catalina.out file represents anything written to STDOUT or STDERR by Tomcat or your applications. This would include things like an application directly writing to System.out or System.err or an application that is configured to log to STDOUT / STDERR or as some logging framework's call it the console. If you have application's writing to STDOUT / STDERR directly, you can use Tomcat's "swallowOutput" option to capture this output and run it through the logging system. http://tomcat.apache.org/tomcat-7.0-doc/config/context.html If you have applications that are logging to STDOUT / STDERR, you can control what's logged by editing the application specific logging configuration or by instructing them to log to a file and not STDOUT / STDERR. For the record, Tomcat writes very little to STDOUT / STDERR and it doesn't use EHCache so it's almost certain that the exception you're seeing is coming from an application. Dan > > > Took the example log4j.properties file from the instructions above, > corrected the logging paths for /var/log/tomcat7, and put it through a > properties to xml converter. Replaced log4j.properties with log4j.xml, > and logging is working. > > Now we want to try and filter out an Exception we are willing to live > with, but can't have overflowing our log. > > Added the following filter: > <filter class="org.apache.log4j.filter.ExpressionFilter"> > <param name="expression" value="EXCEPTION ~= > java.io.NotSerializableException" /> > <param name="acceptOnMatch" value="false"/> > </filter> > > Yet we continue to get the exception in the log: > > Nov 4, 2014 1:52:45 PM > net.sf.ehcache.distribution.RMISynchronousCacheReplicator > replicatePutNotification > SEVERE: Exception on replication of putNotification. error marshalling > arguments; nested exception is: > java.io.NotSerializableException: > com.fakename.services.cache.ehcache.EHCacheServiceImpl. Continuing... > java.rmi.MarshalException: error marshalling arguments; nested exception > is: > java.io.NotSerializableException: > com.fakename.services.cache.ehcache.EHCacheServiceImpl > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138) > ...snip... > Caused by: java.io.NotSerializableException: > com.fakename.services.cache.ehcache.EHCacheServiceImpl > at > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) > at > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) > ...snip... > > What am I doing wrong? Full xml and/or log of error available if > requested. > > *Brandon Darbro > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >