我想解析OstrosLogViewer
一个如下所示的 karaf 日志文件:
15:01:56,405 | INFO | Framework stop | .osgi.CXFExtensionBundleListener 112 | 101 - org.apache.cxf.cxf-core - 3.1.5 | Removing the extensions for bundle 174
15:01:56,405 | INFO | Framework stop | .osgi.CXFExtensionBundleListener 112 | 101 - org.apache.cxf.cxf-core - 3.1.5 | Removing the extensions for bundle 111
15:01:56,405 | INFO | Framework stop | .osgi.CXFExtensionBundleListener 112 | 101 - org.apache.cxf.cxf-core - 3.1.5 | Removing the extensions for bundle 175
日志模式是:
%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
我创建了一个模式。但是解析失败。
type=log4j-native
conversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
name="Test"
charset=UTF-8
我也试过下面。但它也不解析。
type=log4j
pattern=TIMESTAMP|LEVEL|THREAD|CLASS|BUNDLEMESSAGE
dateFormat=HH:mm:ss,SSS
name="TEST2"
charset=UTF-8