【发布时间】:2014-07-11 15:00:35
【问题描述】:
所以我有一个特定的日志文件:
Jul 07, 2014 12:56:06 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jul 07, 2014 12:56:07 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/admin] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@75443fb0]) and a value of type [java.util.WeakHashMap] (value [{class com.hp.sw.bto.security.internal.jaxb.MultiValueMapAdapter=java.lang.ref.WeakReference@53b177f5, class com.hp.sw.bto.security.internal.PrincipleImpl=java.lang.ref.WeakReference@283aa0c0, class java.util.ArrayList=java.lang.ref.WeakReference@210fb1e2, class com.hp.sw.bto.security.internal.jaxb.MultivalueMapEntry=java.lang.ref.WeakReference@d677d63, class com.hp.sw.bto.security.context.builders.SecurityContextSectionBuilder$SecurityContextSectionImpl=java.lang.ref.WeakReference@558f575, class com.hp.sw.bto.security.authz.internal.AuthzPermissionImpl=java.lang.ref.WeakReference@135ad711, class com.hp.sw.bto.security.context.builders.GroupBuilder$GroupImpl=java.lang.ref.WeakReference@30dda704, class com.hp.sw.bto.security.context.builders.RoleBuilder$RoleImpl=java.lang.ref.WeakReference@280010ac, class com.hp.sw.bto.security.internal.jaxb.MultivalueMap=java.lang.ref.WeakReference@1c46a0b8, class com.hp.sw.bto.security.internal.SecurityContextImpl=java.lang.ref.WeakReference@60e19e88}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jul 07, 2014 12:56:08 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/admin] created a ThreadLocal with key of type [com.sun.xml.bind.v2.runtime.Coordinator$1] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@7c6f2468]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@64bf67aa]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jul 07, 2014 12:56:09 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/admin] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@75443fb0]) and a value of type [java.util.WeakHashMap] (value [{class com.hp.sw.bto.security.internal.PrincipleImpl=java.lang.ref.WeakReference@522efd92, class java.util.ArrayList=java.lang.ref.WeakReference@b09a665, class com.hp.sw.bto.security.internal.jaxb.MultivalueMapEntry=java.lang.ref.WeakReference@268b368c, class com.hp.sw.bto.security.context.builders.SecurityContextSectionBuilder$SecurityContextSectionImpl=java.lang.ref.WeakReference@7daa3518, class com.hp.sw.bto.security.authz.internal.AuthzPermissionImpl=java.lang.ref.WeakReference@3183fb1c, class com.hp.sw.bto.security.context.builders.GroupBuilder$GroupImpl=java.lang.ref.WeakReference@4fdb04a9, class com.hp.sw.bto.security.context.builders.RoleBuilder$RoleImpl=java.lang.ref.WeakReference@340f1c34, class com.hp.sw.bto.security.internal.jaxb.MultivalueMap=java.lang.ref.WeakReference@4c04b49f, class com.hp.sw.bto.security.internal.SecurityContextImpl=java.lang.ref.WeakReference@48ee59b6}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jul 07, 2014 12:56:10 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/admin] created a ThreadLocal with key of type [com.sun.xml.bind.v2.runtime.Coordinator$1] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@7c6f2468]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1843e122]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
我正在尝试解析它。但是,当我在测试中尝试我的正则表达式时,它工作正常并且符合我想要的。 http://regex101.com/r/sL4eR0/13 但是当我在代码上尝试它时,它会跳过第一个匹配项,然后输出所有匹配项。我不太清楚为什么或如何解决它。 代码:http://jsfiddle.net/j7rXu/6/
【问题讨论】:
-
仅供参考,regex101 模式在开始时缺少 ^,但是,当放置 ^ 时,它确实有效,所以你的问题成立。
标签: javascript regex parsing logging match