PragmaticFlow / Serilog.Sinks.SpectreConsole

Apache License 2.0
32 stars 7 forks source link

Markup does not work #8

Open yigitl opened 2 years ago

yigitl commented 2 years ago

Markup doesn't work when trying to log messages.

Log.Logger <- 
    LoggerConfiguration()         
        .WriteTo.spectreConsole("{Timestamp:HH:mm:ss} [{Level:u4}] {Message:lj}{NewLine}{Exception}", LogEventLevel.Information)
        .MinimumLevel.Information()
        .CreateLogger()

Log.Information("Information level example with {0}", "parameter")
Log.Information("[underline]Test[/]")
13:11:01 [INFO] Information level example with parameter
13:11:01 [INFO] [underline]Test[/]

Did I forget to configure something or is this working as intended?

AntyaDev commented 2 years ago

@Yaroshvitaliy maybe you can assist with this if it's something trivial

Yaroshvitaliy commented 2 years ago

@yigitl SpectreConsoleTextFormatter.textRenderer does not use any markup and renders a text as is: https://github.com/PragmaticFlow/Serilog.Sinks.SpectreConsole/blob/main/src/Serilog.Sinks.SpectreConsole/SpectreConsoleTextFormatter.fs#L37

shackerd commented 2 years ago

Any reviewer for #9 ?