Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Website Logs in Azure #7945


User avatar
0
bluescopesteel created

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)
  • User Avatar
    0
    maliming created
    Support Team

    Are you using log4net? Will the log file be created on Azure? please shared your log4net.config file

  • User Avatar
    0
    bluescopesteel created

    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>

  • User Avatar
    0
    bluescopesteel created
    <?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>
    
  • User Avatar
    0
    maliming created
    Support Team

    <file value="D:/home/LogFiles/Logs.txt" />

    Is this path valid?

  • User Avatar
    0
    bluescopesteel created

    Yeah sorry - the path was invalid.