Skip to main content

Questions tagged [log4net]

The Apache log4net library is a tool to help the programmer output log statements to a variety of output targets. log4net is a port of the excellent Apache log4j™ framework to the Microsoft® .NET runtime. We have kept the framework similar in spirit to the original log4j while taking advantage of new features in the .NET runtime.

0 votes
0 answers
11 views

How to Archive log4net Logs to an Archive Folder with Date and Time in Filename?

I am using log4net for logging in my .NET application. I need to configure log4net to log to a file until it reaches 10 MB, then move the file to an archive folder within the same base directory. The ...
Omar Ababneh's user avatar
0 votes
1 answer
67 views

Log4Net gives configuration error after .NET 8 update

I have updated my projects solution to .NET 8. After doing so, I am now receiving error logs related to log4net in my Azure AI: log4net: ERROR failed to find configuration section 'log4net' in the ...
Daniel's user avatar
  • 349
0 votes
0 answers
24 views

The same methods always fail to write their logs on only a portion of unrelated instances of a .NET web app

I manage a .NET web application that is hosted on individual customer servers within their own intranet, meaning that there are many instances of this app hosted in entirely separate, unrelated ...
Michael Moldafsky's user avatar
0 votes
0 answers
57 views

Log4net is not working correctly in C# code

I created two loggers. When I start this project, LogFile and LogFolder are working. The contents of the log operate abnormally. Error: The contents of the log are mixed The contents not contain time ...
user avatar
0 votes
0 answers
17 views

Log4Net Custom Levels

Can't add comments so posting as a new question. I implemented the suggestion by Matthew Lock in this thread Log4net creating custom levels Which works fine if you set the log level to TRACE or ALL ...
mpmarven's user avatar
-1 votes
2 answers
63 views

log4net not logging/creating log file

I am trying to use, for logging for a c# console app that I created. It doesn't seem to work for some reason , or I am not sure what I missed. Any help ? log4net.config Program.cs using System; [...
user3449580's user avatar
0 votes
1 answer
53 views

Configuring log4net in a shared library for a micro services architecture in an ASP.NET Core Web API

I am currently working with a micro services architecture in ASP.NET Core Web API, and I have a shared library that is used across all of these micro services. My goal is to leverage log4net as my ...
benny hassan's user avatar
0 votes
0 answers
31 views

log4net library outputs the log message location as the library code, not the calling code

My log4net library does one thing incorrectly. It outputs the file name and line of the library cs code where the log4net::Info method is invoked. How can I setup this up to output the filename and ...
Jana Andropov's user avatar
0 votes
0 answers
32 views

Configure log4net programatically using log4net.Ext.Json

I have an application that uses log4net to perform logging. Because it is a requirement that the user can set the logging level I have configured it programatically. private static Dictionary&...
Laurence Bunnage's user avatar
0 votes
0 answers
27 views

log4net latency (delay in IO operations)

I am using RollingFileAppender of the log4net package to write logs. It appears that log4net writes log messages in batches, so sometimes there's like 10-15 seconds delay before message appear in the ...
Jack's user avatar
  • 360
0 votes
0 answers
30 views

Main Log4Net is working but nested loggers are not

I am working on a legacy .Net Framework 4.5.2 console app that uses Log4Net for logging issues that has been around at least 7+ years. One thing I am noticing is that logging in the main project is ...
WillC's user avatar
  • 1,995
0 votes
0 answers
45 views

Upgrade Log4net.dll from V1.0.2 to V2.0.16 + C# + Crystal Reports = error

We have an ASP.NET MVC application that uses Crystal Report and log4net. When Log4net DLL is upgraded to latest V2.0.16, application throws error Could not load file or assembly 'log4net, Version=1.2....
Navy's user avatar
  • 11
1 vote
1 answer
61 views

log4net Application Insights - not receiving all logs when deployed

I am using log4net to log data to application insights from my Windows Service. To do this I have the following packages: log4net 2.0.12 Microsoft.ApplicationInsights.Log4NetAppender 2.22.0 I have ...
Ryan Thomas's user avatar
  • 1,928
0 votes
0 answers
21 views

Log4net file is keep appending its fileformat while configured through C# code

I am trying to configure Log4Net through the code and it keeps adding the file format to the file name. Trying to configure the appenders through code as I will need a dynamic path for log files based ...
Pratap Singh's user avatar
1 vote
0 answers
24 views

Issue with AdoNetAppender Configuration in Log4net and ThreadContext Usage

I'm having an issue setting up an AdoNetAppender to log my application I'm experiencing an issue while setting up an AdoNetAppender to log my application. I'm using .NET Framework 4.7.2, Quartz 3.8.1....
Tongawz's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
268