Multiple log format

Adrian's Avatar


07 Mar, 2016 08:20 AM

hi , I have a log file with 2 different line formats:
18:58:08,794 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6b09fb41 - Registering current configuration as safe fallback point
2016-03-04 18:58:17.903:INFO:oejs.Server:main: Started @26613ms

 Can I merge both in the same file configuration? ,currently I have 2 different file entrys in my conf.user

  1. Support Staff 1 Posted by potsky on 06 Apr, 2016 06:53 AM

    potsky's Avatar


    yes it is possible but a little bit tricky to do. You need to :

    1. Find a regex matching both kind of lines. It is not really complicated because you can just build ^(first regex for first type | second regex for second type)$
    2. Match severity, for exemple, will be the string concatenation of first severity token and second severity token

    What I don't really like in your log file (except that there are both kind of log lines) is the date/time format which is not the same and date is missing in 18:58:08,794 |-INFO in c for example... So sorting will not work, etc...

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac