Copied to clipboard

Flag this post as spam?

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


  • Dee 118 posts 338 karma points
    Nov 21, 2020 @ 12:22
    Dee
    0

    Serilog - Reduce system logs

    Hi!

    I am wondering if there is a way to log only warnings and errors on system level but allow information logs through application level. I am not sure if saying system level is correct here. What I mean are all of those automatic information logs:

    enter image description here

    I don't need logs above and by turning those off a lot of read write operations would be reduced which is the goal here.

    I found out that if I change the minimum-level in serilog.config to "warning":

        <add key="serilog:minimum-level" value="Warning" />
    

    its only logging warnings and errors but its also blocking application logs on information level, even though they are explicitly logged by the logger in code. I need those application info logs.

    Any ideas?

    Thanks

    Dee

  • Dee 118 posts 338 karma points
    Nov 22, 2020 @ 16:01
    Dee
    100

    the answer was right in the serilog.confg itself as a comment.

    <!-- NOTE: This is how sources can have a different level -->
            <!--
            <add key="serilog:minimum-level:override:Umbraco.Core.Composing.TypeLoader" value="Warning" />
            -->
    

    update: it really helped to optimize the performance of the platform.

Please Sign in or register to post replies

Write your reply to:

Draft