4

I am running Sitecore 9 and am experiencing moments when the Sitecore log is no longer updated (i.e. written to).

I have a default log4net configuration. Only addition I have is a rolling log file appender:

<appender name="StaticFileAppenderTxt" type="log4net.Appender.RollingFileAppender, Sitecore.Logging">
    <file value="$(dataFolder)/logs/_Log.txt" />
    <appendToFile value="true" />
    <rollingStyle value="Size" />
    <maxSizeRollBackups value="10" />
    <maximumFileSize value="1000KB" />
    <staticLogFileName value="true" />
    <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
    </layout>
    <encoding value="utf-8" />
</appender>

But this seems unrelated to the problem as the "normal" log file is also not updated.

Only solution I found so far is performing an IISReset. This is clearly unconvenient.

Any thoughts?

6
  • 1
    Did you have a look at this: stackoverflow.com/questions/14963735/…
    – TamerM
    Nov 8, 2018 at 11:36
  • Is there any information in the windows event viewer?
    – Mikeyp
    Nov 8, 2018 at 14:29
  • No, nothing related in the windows event viewer. Trying the ImmediateFlush parameter.
    – Joost
    Nov 8, 2018 at 21:08
  • Im having same issue in Sitecore 8.1 update 2 solution. basically rollingappender is not working for me.
    – nari447
    Nov 9, 2018 at 7:46
  • @Joost.. I just found out that in my case log files are being created at root of my c drive (c:\data\logs\..).. Please check if this is the case with you.
    – nari447
    Nov 9, 2018 at 9:23

1 Answer 1

1

Solved by adding:

<param name="ImmediateFlush" value="true" />

to the configuration, as mentioned here: https://stackoverflow.com/questions/14963735/log4net-rollingfileappender-not-flushing-io-buffer-with-low-volume-log.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.