spring logback parser

Published on Tue Mar 01 2022

Spring boot logback 日志正则匹配。 样例日志 ``` 2019-12-27 13:52:38.201 INFO 1 --- [Thread-8] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2019-12-27 13:52:39.535 INFO 1 --- [Thread-8] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed 2019-12-27 13:52:39.538 INFO 1 --- [Thread-8] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ... 2019-12-27 13:52:42.539 INFO 1 --- [Thread-8] com.netflix.discovery.DiscoveryClient : Unregistering ... 2019-12-27 13:52:42.540 WARN 1 --- [DiscoveryClient-0] c.netflix.discovery.TimedSupervisorTask : task supervisor shutting down, can't accept the task 2019-12-27 13:52:42.597 INFO 1 --- [Thread-8] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient 2019-12-27 13:52:43.329 WARN 1 --- [XNIO-1 task-15] c.n.eureka.resources.InstanceResource : Not Found (Renew): RPLUS-SERVICE-COMMUNITY - 69bce99f652f:rplus-service-community:20090 ```

Additional matching regexes for
spring logback parser

spring logback parser

Spring boot logback 日志正则匹配。 样例日志 ``` 2019-12-27 13:52:38.201 INFO 1 --- [Thread-8] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2019-12-27 13:52:39.535 INFO 1 --- [Thread-8] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed 2019-12-27 13:52:39.538 INFO 1 --- [Thread-8] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ... 2019-12-27 13:52:42.539 INFO 1 --- [Thread-8] com.netflix.discovery.DiscoveryClient : Unregistering ... 2019-12-27 13:52:42.540 WARN 1 --- [DiscoveryClient-0] c.netflix.discovery.TimedSupervisorTask : task supervisor shutting down, can't accept the task 2019-12-27 13:52:42.597 INFO 1 --- [Thread-8] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient 2019-12-27 13:52:43.329 WARN 1 --- [XNIO-1 task-15] c.n.eureka.resources.InstanceResource : Not Found (Renew): RPLUS-SERVICE-COMMUNITY - 69bce99f652f:rplus-service-community:20090 ```

Match Windows filename in any path but only C: D: and F: drives

Used for Service Discovery in vRealize Operations. Use case is a service that can be installed on any path, but we only want to discover and monitor services installed on standard production drives (C, D or F). Filename will always be the same.

Get commands from Neebula Discovery Language NDL

Matches the commands from Neebula Discovery Language NDL, which is used in ServiceNow Discovery Patterns.

Match 4chan thread URL

Matches a 4chan thread URL, see the examples

Find Reddit Threads

Simply searches for the thread-id in any kind of valid reddit-URL.

freedns.afraid.org/dynamic/

if you use the service you may want to know a state of some responses

Extract Java Exception Message Field

Exception Message: java.lang.NullPointerException: Sample Java Logback Exception at Sample.errorLevel3(Sample.java:35) at Sample.errorLevel2(Sample.java:31) at Sample.errorLevel1(Sample.java:27) at Sample.main(Sample.java:15)