Copied to clipboard

Flag this post as spam?

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


  • antao 81 posts 371 karma points
    Nov 10, 2014 @ 09:43
    antao
    0

    log4net logging DEBUG and INFO messages

    Running a live project of Umbraco and using log4net out of the box, my logging files are growing quickly with DEBUG and INFO messages. All the debug settings are set to false, obviously.

    Does anyone knows how to strict this DEBUG and INFO messages? Thank you. Joao.

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Nov 10, 2014 @ 09:49
    Stefan Kip
    101

    It's configured in '\config\log4net.config' and set to 'Info' by default:

    <?xml version="1.0"?>
    <log4net>
      <root>
        <priority value="Info"/> <!-- Over here -->
        <appender-ref ref="AsynchronousLog4NetAppender" />
      </root>
    
    
      <!--To Change the way logging works for certain namespaces, insert a new logger like: -->
      <!--
        <logger name="Umbraco.Core">
            <level value="WARN" />
        </logger>-->
    
      <appender name="AsynchronousLog4NetAppender" type="Umbraco.Core.Logging.AsynchronousRollingFileAppender, Umbraco.Core">
        <file value="App_Data\Logs\UmbracoTraceLog.txt" />
        <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
        <appendToFile value="true" />
        <rollingStyle value="Date" />
        <maximumFileSize value="5MB" />
        <layout type="log4net.Layout.PatternLayout">
          <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
        </layout>
        <encoding value="utf-8" />
      </appender>
    </log4net>
    
  • antao 81 posts 371 karma points
    Nov 10, 2014 @ 10:08
    antao
    0

    Thanks kipusoep. Solved.

  • antao 81 posts 371 karma points
    Nov 10, 2014 @ 10:22
    antao
    0

    Some more logging levels:

    DEBUG INFO WARN ERROR

    More information about it here.

  • bengan 26 posts 90 karma points
    Feb 06, 2015 @ 13:10
    bengan
    0

    Hi Umbraco folks,

    I know, this is an older post, but I have a question regarding the log4net logging. I'd like to set up the log4net logging for trace logs, that are usually saved in the database table "umbracoLog". Does Umbraco write those log entries automatically in the logfile, when I configure log4net in the way, it is described here?

    The umbraco website is using Umbraco v4.9.1.

    Thanks a lot for your help,

    Ben

Please Sign in or register to post replies

Write your reply to:

Draft