收集到的java的info、error级别的日志格式完全不一样。
例如info 2019-05-30 10:57:35.771 [restartedMain] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
error 2019-05-24 08:48:38.462 [Thread-10] ERROR o.a.e.i.a.AcquireAsyncJobsDueRunnable - exception during async job acquisition: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 44368117ms.
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 44368117ms.
我之前使用的dissect分段截取日志不适用于error级别的日志。拆分出来以后字段错乱。有没有合适的方法截取。
例如info 2019-05-30 10:57:35.771 [restartedMain] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
error 2019-05-24 08:48:38.462 [Thread-10] ERROR o.a.e.i.a.AcquireAsyncJobsDueRunnable - exception during async job acquisition: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 44368117ms.
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 44368117ms.
我之前使用的dissect分段截取日志不适用于error级别的日志。拆分出来以后字段错乱。有没有合适的方法截取。
2 个回复
bellengao - 博客: https://www.jianshu.com/u/e0088e3e2127
赞同来自:
hejidi - 此人很懒。。。
赞同来自:
测试
我的配置文件
运行结果