Mail Archive Home | architecture List | August 2006 Index
| Date Index --> | Thread Index --> |
Hi SebastienWe currently have 2 issues with Monolog, the first one is in the JOnAS BugTracker :
http://forge.objectweb.org/tracker/index.php?func=detail&aid=306032&group_id=5&atid=100005 And here is the second one :I've got the following traces when using Monolog in a system under heavy load :
WARN: Bad stack trace. '(' and ':' expected in the string 'org.objectweb.jonas_ejb.container.JEntityContext.beforeCompletion()V(Optimized Method)'. The full stack trace is the following:
java.lang.Throwableat org.objectweb.util.monolog.wrapper.javaLog.MonologFormatter.getContext()[Ljava/lang/String;(MonologFormatter.java:434) at org.objectweb.util.monolog.wrapper.javaLog.MonologFormatter.format(Ljava/util/logging/LogRecord;)Ljava/lang/String;(MonologFormatter.java:384) at java.util.logging.StreamHandler.publish(Ljava/util/logging/LogRecord;)V(StreamHandler.java:178) at java.util.logging.FileHandler.publish(Ljava/util/logging/LogRecord;)V(Unknown Source) at org.objectweb.util.monolog.wrapper.javaLog.GenericHandler.publish(Ljava/util/logging/LogRecord;)V(GenericHandler.java:260) at java.util.logging.Logger.log(Ljava/util/logging/LogRecord;)V(Unknown Source) at java.util.logging.Logger.doLog(Ljava/util/logging/LogRecord;)V(Unknown Source) at java.util.logging.Logger.log(Ljava/util/logging/Level;Ljava/lang/String;)V(Unknown Source) at org.objectweb.util.monolog.wrapper.javaLog.Logger.log(ILjava/lang/Object;)V(Logger.java:313) at org.objectweb.jonas_ejb.container.JEntityContext.beforeCompletion()V(Optimized Method) at org.objectweb.jonas_ejb.container.TxListener.storeInstances(Ljava/util/LinkedList;)V(TxListener.java:190) at org.objectweb.jonas_ejb.container.TxListener.storeInstances()V(TxListener.java:82) at org.objectweb.jonas_ejb.container.TxListener.beforeCompletion()V(TxListener.java:145)
After looking at the guilty code (MonoloFormatter.getContext()~464), I've noticed that you print the entire Exception message at the warn level :
{code}
//m = %C.%M(Toto.java:%L)
deb = m.indexOf("(");
fin = m.indexOf(":");
if (deb == -1 || fin == -1) {
AbstractFactory.warn("Bad stack trace. '(' and ':' expected
in the string '" + m
+ "'. The full stack trace is the following:\n"
+ sw.getBuffer().toString());
return new String[]{"","",""};
}
String[] res = new String[3];
res[2] = (fin == -1 ? "unknown" : m.substring(fin + 1,
m.length() - 1));
m = m.substring(0, deb);
{/code}
Is this really needed ?
under load, a lot a methods call in the Stack will ends with (Optimized
Method), maybe a lower level will be more appropriate ?
2nd thing : Can we change the || to be a && ? If we have deb, we can still have the class and method names, only line number is unavailable.
Regards Guillaume
begin:vcard fn:Guillaume Sauthier n:Sauthier;Guillaume org:<a href="http://www.objectweb.org"><img title="Objectweb" alt="Objectweb" border="0" src="http://www.objectweb.org/media/interface/logoow3.gif" /></a> Open Source Middleware adr:;;;;;;France email;internet:guillaume.sauthier@xxxxxxxxxxxxx title:<a href="http://jonas.objectweb.org">JOnAS Application Server</a> x-mozilla-html:FALSE url:http://jonas.objectweb.org version:2.1 end:vcard
| Date Index --> | Thread Index --> |
Powered by MHonArc.
Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.