Base solution for your next web application
Open Closed

log4net stopped generating the logs #10034


User avatar
1
ricardo created
  • What is your product version: v10.0.0

  • What is your product type (Angular or MVC) : MVC

  • What is product framework type (.net framework or .net core):net core

Hi, after upgrading to version 10.0.0, Log4Net stopped logging the logs. I'm running visual Studio as an administrator and i have write access to the folder.

log4net.config:



  
    
    
    
    
    
    
    
      
    
  
  
    
    
  

 //Configure Abp and Dependency Injection
            return services.AddAbp(options =>
            {
                //Configure Log4Net logging
                options.IocManager.IocContainer.AddFacility(
                    f => f.UseAbpLog4Net().WithConfig(_hostingEnvironment.IsDevelopment()
                        ? "log4net.config"
                        : "log4net.Production.config")
                );

                options.PlugInSources.AddFolder(Path.Combine(_hostingEnvironment.WebRootPath, "Plugins"), SearchOption.AllDirectories);
            });

I'm forgetting something?


3 Answer(s)
  • User Avatar
    0
    ricardo created

    sorry i was looking in the wrong folder

  • User Avatar
    0
    alexanderpilhar created

    I have had the same problem just now - I couldn't find current log files ...

    For anyone wondering where to find them, the correct path is:
    <root>\src\CompanyName.ProjectName.Web.Host\bin\Debug\net5.0\App_Data\Logs

  • User Avatar
    0
    alexanderpilhar created

    With ASPNETZERO 10.2.0 the path has been changed back and log files can be found in:
    <root>\src\CompanyName.ProjectName.Web.Host\App_Data\Logs