Search code examples
c#.netlogginglog4view

Log4View not showing any messages


I'm trying to open our log-file in Log4View but it doesn't show any messages.

A sample logfile entry looks like this:

15.11.2017 07:56:45.555 Normal BaseSessionHandler 3x1r0p5hk3utkd1i2iqyqufg Aktuelle Anzahl Sessions: 6

I've set Log4View up to use a Pattern Layout: %d [%t] %level %logger [%x] - %m but unfortunately that doesnt work...

Do you have an idea why it doesn't show any messages?

Thanks in advance


Solution

  • Well, it seems like the pattern layout you use has got not much in common with your actual message structure.

    Assuming BaseSessionHandler is a logger and 3x1r0p5hk3utkd1i2iqyqufg is a thread, you should use a pattern similar to this:

    %date{dd.MM.yyyy HH:mm:ss.fff} %level %logger %x %m

    Check out this documentation on the elements of a layout pattern.