WDTBD: My log4net is logging it cannot log

What does this button do? My log4net is logging it cannot log… let’s see if this setting will help:

<lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>

In the logfile directory logs are not updated, but these files are added:
43f09a4c-7a28-4931-9aaa-2a27aaffe9ealog4net.txt

Containing messages like:

log4net:ERROR [FileAppender] OpenFile(C:\inetpub\wwwroot\MySite\Data\logs\log.txt,True) call failed.
System.IO.IOException: The process cannot access the file 'C:\inetpub\wwwroot\MySite\Data\logs\log.txt' because it is being used by another process.

So let’s try this solution:

<appender name="MySiteLogFileAppender" type="log4net.Appender.FileAppender, Sitecore.Logging">
<lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
[...]

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s