Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Emil Schoelzer Schnohr 16 posts 126 karma points
    Mar 22, 2021 @ 13:58
    Emil Schoelzer Schnohr
    0

    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!

  • Marc Goodson 1451 posts 9716 karma points MVP 5x c-trib
    Mar 22, 2021 @ 19:51
    Marc Goodson
    0

    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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies