Kittyfisto/Tailviewer

Is serilog file format supported?

Opened this issue · 4 comments

raelb commented

Hello,

Is serilog file format supported in the latest release version (0.9.6.2)? By default, it seems not:

image

Please tell me what steps are required to enable serilog support.
Thanks

Same issues here. Serilog shows under the Custom log formats area so it was supported at some point. I've tried using the custom formats, but no luck either.

@raelb, @jrod567 Sorry for the late reply, I've been on an extended hiatus as far as my development projects were concerned.

The latest Tailviewer version (which is not yet released, but good enough to be used - I use it in my daily business) is capable of parsing serilog files, given that one configures the precise format string with tailviewer first:

  1. Download and install the latest Tailviewer version: https://ci.appveyor.com/project/Kittyfisto/sharptail/build/artifacts
  2. Start Tailviewer, click File and then Settings
  3. Click the "Plus" Icon next to Serilog in the list of custom file formats (yes, the UI is horrible)
  4. Enter {Timestamp:yyyy-MM-dd HH:mm:ss.fff K} [{Level:u3}] {Message} in the right-most input field:
    image
  5. Restart Tailviewer

Given that the formatting string is correct, you should see that Tailviewer has detected the log levels correctly and colorized the log entries accordingly:

image

The format string should be the same one that you use to configure serilog (See https://github.com/serilog/serilog/wiki/Formatting-Output), but if you find discrepancies, please let me know - you'll be the first ones to try this out besides myself. Plus the UI is really unhelpful and doesn't provide any useful feedback when inputing these format strings.

Kittyfisto - Thanks so much for the response - this is working great for me now!
I ended up using the following Serilog format: {Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] {Message}

What about full message template, f.e.:
[{Timestamp:yyyy-MM-dd HH:mm:ss.fff} {Level:u3}] {Message:lj} {Properties} {NewLine}{Exception}

(from the same Wiki above)?