Ucommerce 9 - Spam in logs: "Running ToList() query on index"
I have this Ucommerce 9 webshop running, but just deleted 7gb of log files generated over a few months. There are no errors in them, just loads of lines starting with "Running ToList() query on index at".
It seems to be from my navigation controller which returns a partial view with a category navigation. It gets these categories from the Ucommerce CatalogLibrary API (e.g. catalogLibrary.GetCategory). So everytime I reload the page, it adds about 80kb to the log file spammed with this line.
I am wondering if I've just coded it in an inefficient way. But the rather low traffic shop runs fine, so a decent fix for me right now would be to just disable this logging. Do you know if I can control what Ucommerce is logging somewhere, or maybe even disable it?
I think you can override the level of serilogging on a namespace specific basis, so if you know the namespace responsible for the Running ToList query on index at, then I think you can change it from the default 'information' to be something more pragmatic like 'error'
Thanks it helped a lot. Though I couldn't figure out the namespace, I just changed the minimum log level in serilog.config from "Debug" to "Warning". So only warnings and errors gets logged.
Ucommerce 9 - Spam in logs: "Running ToList() query on index"
I have this Ucommerce 9 webshop running, but just deleted 7gb of log files generated over a few months. There are no errors in them, just loads of lines starting with "Running ToList() query on index at".
It seems to be from my navigation controller which returns a partial view with a category navigation. It gets these categories from the Ucommerce CatalogLibrary API (e.g. catalogLibrary.GetCategory). So everytime I reload the page, it adds about 80kb to the log file spammed with this line.
I am wondering if I've just coded it in an inefficient way. But the rather low traffic shop runs fine, so a decent fix for me right now would be to just disable this logging. Do you know if I can control what Ucommerce is logging somewhere, or maybe even disable it?
Thanks!
HI Emil
I think you can override the level of serilogging on a namespace specific basis, so if you know the namespace responsible for the Running ToList query on index at, then I think you can change it from the default 'information' to be something more pragmatic like 'error'
https://our.umbraco.com/documentation/reference/config/Serilog/#changing-the-log-level-for-specific-namespaces
I don't think there is an 'off' option, but my guess is they are not logging that message as an 'error'..
regards
marc
Thanks it helped a lot. Though I couldn't figure out the namespace, I just changed the minimum log level in serilog.config from "Debug" to "Warning". So only warnings and errors gets logged.
is working on a reply...