Logging into couchbase using serilog sink in .net core

I currently have a .net core 3.1 project and for different database operations using couchbase. and now planning to use couchbase for storing the logs as well.

I have serilog implemented in my code and currently logging into a rolling file. but i want to change this to couchbase instead of a local rolling file.

installed Serilog.Sinks.Couchbase nuget package and used the below code in my program.cs class to connect to couchbase for logging.

 public class Program
        public static IConfiguration Configuration { get; } = new ConfigurationBuilder()
            .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
            .AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"}.json", optional: true)

        public static int Main(string[] args)
           var serversArray = new string {"https://server.com/8091"};
            Log.Logger = new LoggerConfiguration()
               .WriteTo.Couchbase(serversArray, "logBucket", LogLevel.Information)

                Log.Information("Starting Project");
                return 0;
            catch (Exception ex)
                Log.Fatal(ex, "Host terminated unexpectedly");
                return 1;

        public static IHostBuilder CreateHostBuilder(string[] args) =>
                .ConfigureWebHostDefaults(webBuilder =>
                .UseDefaultServiceProvider((context, options) =>
                    options.ValidateScopes = context.HostingEnvironment.IsDevelopment();
                    options.ValidateOnBuild = true;

But the above code is giving me an exception:

Message=Could not load file or assembly ‘Serilog.FullNetFx, Version=, Culture=neutral, PublicKeyToken=24c2f752a8e58a10’. The system cannot find the file specified.
at Serilog.LoggerConfigurationCouchbaseExtensions.Couchbase(LoggerSinkConfiguration loggerConfiguration, String couchbaseUriList, String bucketName, LogEventLevel restrictedToMinimumLevel, Int32 batchPostingLimit, Nullable`1 period, IFormatProvider formatProvider)

Did not find any references on using couchbase for logging using serilog


First, let me point out that the package you are using to integrate Serilog isn’t an official extension provided by Couchbase, this is a third-party package of some kind.

As to your issue, this package hasn’t been updated since 2015. It appears to be compatible only with the legacy .NET Framework, not with .NET Core. That is the most likely source of your problem.

That makes sense. thank you @btburnett3