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

TypeLoadException #46

Open
michaelosthege opened this issue Jun 25, 2021 · 1 comment
Open

TypeLoadException #46

michaelosthege opened this issue Jun 25, 2021 · 1 comment

Comments

@michaelosthege
Copy link
Contributor

Hi,
I'm getting exceptions when attemting to do

var credentials = new NoAuthCredentials(lokiUrl);
var llp = new LogLabelProvider();
Console.WriteLine("Creating logger config");
Log.Logger = new LoggerConfiguration()
    .MinimumLevel.Verbose()
    .WriteTo.Console()
    .WriteTo.LokiHttp(credentials, llp)
    .CreateLogger();

grafik

Version numbers:

  • .NET Framework 4.6.2 (console application)
  • Serilog 2.10.0 (latest stable)
  • Serilog.Sinks.Http 7.2.0 (latest stable)
  • Serilog.Sinks.Loki 3.0.0 (latest stable)

I attempted to use the prerelease version 3.0.1, but then I get errors on the LogLabelProvider (copied from the readme) not implementing the interface correctly.

Looks like I have a bad combination of versions?

@Falco20019
Copy link
Contributor

Falco20019 commented Jul 14, 2021

You can not use Serilog.Sinks.Loki 3.0.0 with Serilog.Sinks.Http > 5.x since there were major updated breaking the compatibility. v4.0.0-beta1 will be targeting 7.2.0 and therefore fix your issue. Sadly, something with releasing the package went wrong and the DLLs included are not updated and still on 3.0.1-beta1 state (see #50).

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

No branches or pull requests

2 participants