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

Make the class LokiHttpClient abstract to be used in appsettings.json #28

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

anaselhajjaji
Copy link
Contributor

To use appsettings.json with LokiHttp, the arguments need to be of type Interface or Abstract (required by: serilog-settings-configuration).

See code here

Example of code:

"WriteTo": [
      {
        "Name": "LokiHttp",
        "Args": {
          "credentials": "MyNamespace.MyAuthCredentials, MyAssemblyName",
          "labelProvider": "MyNamespace.MyLogLabelProvider, MyAssemblyName",
          "httpClient": "MyNamespace.MyLokiHttpClient, MyAssemblyName"
        }
      }
    ]

@josephwoodward josephwoodward merged commit 89319f2 into josephwoodward:master Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants