Log4View does not show messages of log4net log file.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Log4View does not show messages of log4net log file.

Hani
I have a log4net log file (PatternLayout) with some rows inside.
Here is an example for a single row:
"2016-08-10 13:16:07,092 [10] INFO  L4NFramework.WinForm.Form1 - Just an information from Windows Form app".

When i am trying to open the log file with Log4View, or drag and dropit to an open Log4View wundow, it does nothing. The viewer stays empty.

Any ideas? lots of hours about this issue...

Thanks,
Hani
Reply | Threaded
Open this post in threaded view
|

Re: Log4View does not show messages of log4net log file.

Philipp Lauchner
Administrator
Dear Hani,

by default Log4View expects a log file to have xml formated messages. You are using pattern massages and thus have to set up the matching layout pattern when adding the file. You can find log4nets layout modifiers at their documentation:
https://logging.apache.org/log4net/log4net-1.2.13/release/sdk/log4net.Layout.PatternLayout.html

Assuming [10] is the process id (pid) of the message, the correct pattern layout is

%date [%property{pid}] %level  %logger - %message





Yours sincerely

Philipp Lauchner
PROSA GmbH  
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: Log4View does not show messages of log4net log file.

Hani
Of course, Thanks!