nzinsli
asked on
log4net localhost log file
I have log4net setup on our site. Its working fine in our dev and live sites, but I cant seem to get it to work on localhost. I tried changing the file in the config to \folder\filename and also c:\path\filename. I ran thru a debug of the code, and it is going thru those sections of code w/o error. Is there folder permissions or something else that would prevent this from working locally?
Using windows xp w/ IIS 5.1
Using windows xp w/ IIS 5.1
Check the path while debugging to which location your app is pointing to.
ASKER
I was inspecting the object in my code trace, but wasnt able to see a file path in any of them. Any other thoughts?
I dont think windows XP checks for write permissions. If possible can you paste your log4net.config file.
Thanks.
Thanks.
ASKER
<log4net>
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
<file value="\App_Data\Logs\BVLogs.log"/>
<rollingStyle value="size"/>
<appendToFile value="true"/>
<maximumFileSize value="1GB"/>
<maxSizeRollBackups value="2"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %logger - %message%newline"/>
</layout>
</appender>
<root>
<level value="ALL"/>
<appender-ref ref="RollingFile"/>
</root>
</log4net>
Every thing looks fine except file.
file name should be like this <file value="..\App_Data\Logs\BV Logs.log"/ >
As you told you tried with "C:\..." I don think that is an issue. But try changing it to absolute path and restart your IIS.
I used log4net in windows app and out of my knowledge it should work with the above config. Give it a try restarting IIS after making changes to file.
file name should be like this <file value="..\App_Data\Logs\BV
As you told you tried with "C:\..." I don think that is an issue. But try changing it to absolute path and restart your IIS.
I used log4net in windows app and out of my knowledge it should work with the above config. Give it a try restarting IIS after making changes to file.
ASKER
Nothing I've tried is working. :(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've given up on this issue.