4,016 questions
0 votes
1 answer
66 views
How to use ThreadContext in Log4Net?
I have a code like this: var messageProcesses = (from message in messageQueue.Messages select ProcessMessageAsync(message)).ToList(); try { await Task.WhenAll(messageProcesses)...
0 votes
0 answers
91 views
Log4Net - "The file is not currently locked" exception in custom appender, log is not being written
In a .NET Standard 2.0 class library, I'm trying to write my own RollingFileAppender which will work with a buffer that will be flushed periodically. The reason for this, is the need to have my ...
1 vote
0 answers
285 views
Upgrading log4net from 1.2.10 to 3.0.4.0
I've a very old legacy ASP.NET web project and I'm trying to upgrade it to latest Log4Net version (from 1.2.10 to 3.0.4). The first problem is that I'm using other old libraries which are using ...
0 votes
1 answer
98 views
How to turn off excessive debug log noise from Snowflake.Data nuget package in my .NET framework?
I use Snowflake.Data nuget package in my .NET 4.7.2 project. All the debug logs in the decompiled Snowflake.Data library (v4.3.0) are appearing in my application log which is too much. My application ...
0 votes
0 answers
46 views
log4net smtp appender not sending emails, but I don't get any configuration errors
I am trying to configure a smtp appender in the log4net.config file that I have. The file appender works perfectly, while sending emails does not, but in the various logs I have not noticed any ...
0 votes
0 answers
23 views
How to use unity container with log4net (Specific with .net 4.7.2) [duplicate]
I have used below code to this dependency injection with unity framework along with log4net. Working code snippet: var container = new UnityContainer().RegisterType<ILog>(new InjectionFactory(x =...
0 votes
0 answers
31 views
log4net stops writing to the db
I have Windows Service, written on the .net Framework 4.8, which writes logs with log4net, version 3.0.3. log4net writes at the same time in the local file on the server, and in the sql db with ...
0 votes
0 answers
50 views
Logging with Log4Net in static class [duplicate]
I know there are several closely relevant Stack Overflow questions out there, but I'm having a hard time making the mental leap to apply them to what I am working with (for example, ASP.NET Core Web ...
0 votes
1 answer
1k views
Log4Net not logging information in .NET 8
I'm trying to use Log4Net in my .NET 8 application This is my log4net config: <?xml version="1.0" encoding="utf-8"?> <log4net> <root> <level value=&...
0 votes
1 answer
151 views
Getting the CategoryName from a ILogger
We are working on migrating from log4net to the Microsoft.Extensions.Logging library and I'm implementing an ILogger to write to our existing log table. One of the things we log from log4net is the &...
0 votes
0 answers
94 views
Using log4net in Powershell: setting a property works, but is not used
I have an PowerShell module that initializes a log4net with a default config file so I can use this in my PS Scripts. This works fine. My module has a parameter so i can specify to with file the ...
0 votes
1 answer
181 views
Graylog with log4net Gelf Appender and AdditionalFields send NULL value
I have a web application with log4net Logger. Now I want to send log data to the Graylog Logger Service. Sending log data from log4net to Graylog with AdditionalFields is not working in the right way. ...
1 vote
0 answers
38 views
How to Configure log4net in Unity to Capture Context-Specific Logs from Debug.Log
I’m working on a custom LoggerService in Unity that needs to write logs to a file (using a Rolling Appender), send logs to an HTTP endpoint, and print logs to Unity’s console. I want this system to be ...
0 votes
1 answer
81 views
how to add two different log config files in startup.cs?
How to add two different log config files in startup.cs? We are trying to add two different config files as shown in the below code in startup.cs file under ConfigureServices(). But, we are facing an ...
0 votes
1 answer
129 views
Log4Net Could not load file or assembly
Error: SetUp method failed. SetUp : System.IO.FileLoadException : Could not load file or assembly 'log4net, Version=2.0.7.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its ...