Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Epsagon Overwriting Existing Serilog Logger #81

Open
cookiekitty opened this issue Apr 27, 2022 · 0 comments
Open

Epsagon Overwriting Existing Serilog Logger #81

cookiekitty opened this issue Apr 27, 2022 · 0 comments

Comments

@cookiekitty
Copy link

cookiekitty commented Apr 27, 2022

Our application already had Serilog with sinks to file, console, and SEQ via a JSON appsettings setup. From Program.cs:

public static void Main(string[] args)
        {
            Log.Logger = new LoggerConfiguration()
                .ReadFrom.Configuration(Configuration)
                .Enrich.WithBuildInformation(Configuration.GetSection("Build").Get<...customconfigurationobject...>())
                .CreateLogger();

          // other code below that calls Startup.cs
        }

After adding in Espagon (inside the Startup.cs file), it overwrites the logger object and removes all of our settings. Is it possible to have Espagon logging AND other Serilog loggers or is Espagon meant to be the one and only logger available once it is instantiated with the bootstrap?

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

No branches or pull requests

1 participant