Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WriteTo:ConditionalSink does not work in sample application #337

Open
edespong opened this issue Nov 7, 2022 · 1 comment
Open

WriteTo:ConditionalSink does not work in sample application #337

edespong opened this issue Nov 7, 2022 · 1 comment

Comments

@edespong
Copy link

edespong commented Nov 7, 2022

According to #293 (comment) the 'New expression package uses shorter syntax (CLEF) for expressions.'

as such, the WriteTo:ConditionalSink sink in sample application does not work as expected. @Level should be @l

"WriteTo:ConditionalSink": {
      "Name": "Conditional",
      "Args": {
        "expression": "@Level in ['Error', 'Fatal']",
        "configureSink": [
          {
            "Name": "File",
            "Args": {
              "path": "%TEMP%/Logs/serilog-configuration-sample-errors.txt",
              "formatter": {
                "type": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact",
                "valueFormatter": {
                  "typeTagName": "customTypeTag"
                }
              }
            }
          }
        ]
      }
    }

https://github.com/serilog/serilog-settings-configuration/blob/dev/sample/Sample/appsettings.json#L49

@nblumhardt
Copy link
Member

Thanks, nice spotting 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants