none
Data Points - Logging SQL and Change-Tracking Events in EF Core

All replies

  • Hey friends. The 2.2 version of .NET core introduced a simpler way to define an ILoggerFactory for the console. The filtering you learn about in this article doesn't change but the syntax for defining it does. If you use the above code you'll get a warning that the ConsoleLoggerProvider is obsolete even though it will still work. I wrote a blog post about the newer, simpler syntax at http://thedatafarm.com/data-access/logging-in-ef-core-2-2-has-a-simpler-syntax-more-like-asp-net-core/.

    Julie Lerman, Author of Programming Entity Framework, MVP

    Tuesday, January 1, 2019 4:25 PM
    Answerer
  • Can we add custom messages in the log like we can do using EF6

    using (var context = new BookStore())
    {
        context.Database.Log = Console.Write;
        context.Database.Log("Custom message");
    }

    I need to add custom messages to the log in EF core

    MW

    Tuesday, May 14, 2019 1:14 PM