'serilog 1.5.1 missing CloseAndFlush()

I am using serilog v1.5.1 (due to compatibility with .NET 4.0) and there is no CloseAndFlush() function. What is the alternative? It is generating the log file but not writing to it.

Log.Logger = new LoggerConfiguration()
            .MinimumLevel.Debug()
            .WriteTo.Console()
            .WriteTo.File($"logs/log{timestamp}.txt", outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] {Message:lj}{NewLine}{Exception}")
            .CreateLogger();

        Log.Information("test!!");
        Log.Logger.Information("Hello!");
        


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source