LogMX not showing entries on INFO level (logback format)

Here developers can talk about how to write a Parser for LogMX

Moderator: admin

Post Reply
holger
Posts: 6
Joined: Wed Sep 01, 2021 11:17 am

LogMX not showing entries on INFO level (logback format)

Post by holger »

I followed the description found here: http://logmx.com/forum/viewtopic.php?f= ... evel#p5861

Although it is "INFO " in the log file, these entries are not shown. See attached screenshot:
Screenshot 2021-09-01 at 13.10.22.png
Screenshot 2021-09-01 at 13.10.22.png (92.65 KiB) Viewed 57293 times
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: LogMX not showing entries on INFO level (logback format)

Post by admin »

Hello,

First, really sorry for the very late response, all the posts on this forum were silently queued, but the forum is now fixed.

I tried with the latest version of LogMX (v8.1.0), and it worked for me (i.e. both DEBUG and INFO entries show up), but I had to manually type in the Logback pattern string, as well as the 2 log file lines, so maybe there's an extra white space somewhere I missed on your screenshot. Do you mind posting here your Logback pattern string as well as your log file lines? (as text). For example, I think you have 2 white spaces after "INFO" in your screenshot but I'm not sure (it wouldn't work with a single one, as the pattern includes "%-5level")

log-parser.png
log-parser.png (38.57 KiB) Viewed 57287 times
holger
Posts: 6
Joined: Wed Sep 01, 2021 11:17 am

Re: LogMX not showing entries on INFO level (logback format)

Post by holger »

> "so maybe there's an extra white space somewhere I missed on your screenshot"

Hello Xavier,

between level and emitter there are two spaces, according to your explanation I found here: http://logmx.com/forum/viewtopic.php?f= ... evel#p5861:

"you shall have "YourThread] " and then exactly 5 characters to represent the log level, padding with white-space characters around it if needed (e.g. "INFO " instead of "INFO")"

Here I applied the pattern to the three different level names INFO, "INFO ", INFOS:
INFO.png
INFO.png (75.13 KiB) Viewed 57283 times
INFO_padded_with_space.png
INFO_padded_with_space.png (74.46 KiB) Viewed 57283 times
INFOS.png
INFOS.png (85.24 KiB) Viewed 57283 times
Attachments
logmx.Logback_with_method_and_line_parser.export.zip
(697 Bytes) Downloaded 1838 times
holger
Posts: 6
Joined: Wed Sep 01, 2021 11:17 am

Re: LogMX not showing entries on INFO level (logback format)

Post by holger »

Here is the exported parser pattern and a log file to reproduce the behaviour.
Attachments
ActionServer.2021-11-05.log.zip
(1.2 MiB) Downloaded 1745 times
logmx.Logback_with_method_and_line_parser.export.zip
(697 Bytes) Downloaded 1818 times
holger
Posts: 6
Joined: Wed Sep 01, 2021 11:17 am

Re: LogMX not showing entries on INFO level (logback format)

Post by holger »

The version in use:
Screenshot 2021-11-08 at 09.16.59.png
Screenshot 2021-11-08 at 09.16.59.png (43.84 KiB) Viewed 57283 times
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: LogMX not showing entries on INFO level (logback format)

Post by admin »

Hello,

It seems like you exported (or sent) the wrong Parser. This is the parser you attached to this forum:
imported-parser.png
imported-parser.png (19.88 KiB) Viewed 57280 times
As you can see the date expected by this Parser also contains day/month/year, and not just hour/min/sec like your logs.

But I tried with the following Parser pattern instead (I just created it):

Code: Select all

%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} %method %line - %msg%n
And the INFO entries were correctly parsed:
parser-ok.png
parser-ok.png (42.04 KiB) Viewed 57280 times
I even tried with the exact line of log you were having issues with, as well as set the Parser locale to "German" like you, and it works well:
parser-ok-2.png
parser-ok-2.png (31.9 KiB) Viewed 57279 times

Please send the Parser you showed in your screenshot and I will try again with it.

Let me know!
Xavier
holger
Posts: 6
Joined: Wed Sep 01, 2021 11:17 am

Re: LogMX not showing entries on INFO level (logback format)

Post by holger »

Hello Xavier,

thanks for helping me. I opened the parser, cut the not working pattern and pasted it again and suddenly it worked.

However, it would be interesting to know the cause. So I attached the damaged parser.

Sincerely,
Holger
Attachments
logmx.Logback_with_method_and_line_damaged.parser.export
(450 Bytes) Downloaded 1837 times
holger
Posts: 6
Joined: Wed Sep 01, 2021 11:17 am

Re: LogMX not showing entries on INFO level (logback format)

Post by holger »

Hello Xavier,

I found the cause. Under "Tags setting" for Level "May contain space(s)" has to be true.
Screenshot 2021-11-09 at 12.06.38.png
Screenshot 2021-11-09 at 12.06.38.png (99.57 KiB) Viewed 57277 times
Thanks,
Holger
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: LogMX not showing entries on INFO level (logback format)

Post by admin »

Oh I see, thanks for the feedback. Yes it is indeed checked by default, so that is why I couldn't reproduce the issue without your parser (this option was checked on my end)
Post Reply