Base solution for your next web application
Open Closed

Log4net : App_Data folder is not created #10121


User avatar
0
mahendra created
  • What is your product type (Angular or MVC)?
  • Angular
  • What is product framework type (.net framework or .net core)?
  • .net core

If issue related with ABP Framework

  • What is ABP Framework version?
  • 5.2

Hi Experts,

We have hosted our application which is based on ABP Framework in the "AWS Elastic Beanstalk" enviornment. We have the below setting in log4net.config :

<?xml version="1.0" encoding="utf-8" ?> <log4net> <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" > <file value="App_Data/Logs/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>

However, AppData folder is not created. Any help would be much appreciated.

Thanks


1 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @mahendra

    Can you please update your log4net.config file as seen below:

    <file value="../../../App_Data/Logs/Logs.txt" />
    

    https://github.com/aspnetzero/aspnet-zero-core/blob/859a0132610e6a578ecd4857c59461008d8d5cd8/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/log4net.config#L4