My Website Logs (in Admin/Maintenance) are not working in Azure. They work fine locally. I cant find any doco for them.
I have tried googling "Asp.net zero website logs" - but nothing.
So how do I configure them on Azure?
We are using .NET Core/Angular
5 Answer(s)
-
0
Are you using
log4net
? Will the log file be created on Azure? please shared yourlog4net.config
file -
0
Here is what is in my config file:
<?xml version="1.0" encoding="utf-8" ?> <log4net> <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" > <file value="D:/home/LogFiles/Logs.txt" /> <appendToFile value="true" /> <rollingStyle value="Size" /> <maxSizeRollBackups value="10" /> <maximumFileSize value="10000KB" /> <staticLogFileName value="true" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%-5level %date [%-5.5thread] %-40.40logger - %message%newline" /> </layout> </appender> <root> <appender-ref ref="RollingFileAppender" /> <level value="DEBUG" /> </root> </log4net>
-
0
<?xml version="1.0" encoding="utf-8" ?> <log4net> <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" > <file value="D:/home/LogFiles/Logs.txt" /> <appendToFile value="true" /> <rollingStyle value="Size" /> <maxSizeRollBackups value="10" /> <maximumFileSize value="10000KB" /> <staticLogFileName value="true" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%-5level %date [%-5.5thread] %-40.40logger - %message%newline" /> </layout> </appender> <root> <appender-ref ref="RollingFileAppender" /> <level value="DEBUG" /> </root> </log4net>
-
0
<file value="D:/home/LogFiles/Logs.txt" />
Is this path valid?
-
0
Yeah sorry - the path was invalid.