I am trying to show the line numbers in logmx with no luck. Here is my logging statement
INFO 2008-11-05 17:38:02,138 MyClass(64) - This is the message
and my pattern is %-5p %d %C{1}(%l) - %m\n
I can't get it to display the line number next to the class name. I have tried upper and lower case version of 'L' without any luck.
The parser recognizes I'm trying to view the FullLocation but it shows up red. What is causing this and how can I fix it.
Line Numbers (log4j)
Moderator: admin
Hello,
LogMX displays this field ("FullLocation") in red because it's not a LogMX native field like Level, Emitter, Message, ... and is not displayed in a dedicated column in the main log entries table.
To display this "extra" field as a prefix in the column "Message", click the button "Tags settings >>" in the parser creation dialog. A new table appeared on the right: check the column "Include in Message field" of line "FullLocation".
This pattern also seems to include two mistakes:
LogMX displays this field ("FullLocation") in red because it's not a LogMX native field like Level, Emitter, Message, ... and is not displayed in a dedicated column in the main log entries table.
To display this "extra" field as a prefix in the column "Message", click the button "Tags settings >>" in the parser creation dialog. A new table appeared on the right: check the column "Include in Message field" of line "FullLocation".
This pattern also seems to include two mistakes:
- The pattern should end with "%n" instead of "\n"
- "%-5p %d" means: at least 5 characters for a log Level, a white-space, and a Date.
But your log entry example starts with "INFO 2008...": 4 characters for a log Level, a white-space, and a Date.
(note: maybe you really have 2 white-space characters after "INFO" but this HTML forum displays only the first white-space character...)
-
- Posts: 3
- Joined: Thu Nov 06, 2008 4:10 am