Base solution for your next web application
Open Closed

Disable logging all SQL statements #3531


User avatar
0
krileo created

It appears that by default all SQL statements are logged by the backend. We can't seem to figure out where this is configured.

Is there a way to turn of logging of SQL statements?

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

7 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Can you share a sample log ? Is it logged to database or log file ?

    Thanks.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    krileo created

    Hi.

    We replaced the logging framework with nLog as described in the documentation, and we are currently logging to a file.

    Basically all SQL commands executed by EF Core seems to be logged which makes the log files huge.

    Regards

    Kristian

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ribbo created

    Which log file is it going into? This doesn't happen to me but at times I would like it. I will ask the same question in reverse, how can I turn this on?

    Thanks, Matt

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    krileo created

    I will let you know as soon as I figured out how to enable / disable it ;)

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    nicolaslau created

    how to enable it ? i set appsetting.json , Logging:LogLevel. but logging any about ef.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    nicolaslau created

    @krileo how to enable / disable it ? i cann`t enable it

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    BobIngham created

    Basically all SQL commands executed by EF Core seems to be logged which makes the log files huge.

    I have a fresh install of 10.4.0 and this is happenning. How can I switch it off?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)