Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

options.TimestampFormat is deprecated. What is the alternative?

I've created a ILoggerFactory, and added a console provider. I want to add timestamp, but it sounds like options.TimestampFormat is obsolete.

        private static ILoggerFactory _loggerFactory = LoggerFactory.Create(builder =>
    {
        builder.AddConsole(options =>
        {
            options.TimestampFormat = "HH:mm:ss ";
        });

Issue What can I do instead? I can't find any solutions online.

like image 598
ninjarubberband Avatar asked Nov 14 '25 10:11

ninjarubberband


1 Answers

I solved it myself. It was as simple as using builder.AddSimpleConsole() instead of builder.AddConsole().

like image 200
ninjarubberband Avatar answered Nov 17 '25 06:11

ninjarubberband