4,012 questions
0
votes
1
answer
102
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
110
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
423
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
107
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
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
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
2k
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
229
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
99
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
238
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
43
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
83
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
169
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 ...
1
vote
0
answers
98
views
log4net ERROR: {code: 0, message: 'An internal error occurred during your request!', details: null, validationErrors: null} in .NET core
I tried to login after adding log4net to create logs in the Postgres SQL Database but, failed to login.
The issue is "ERROR: {code: 0, message: 'An internal error occurred during your request!', ...
1
vote
1
answer
86
views
log4net:ERROR ConfigureFromXml called with null 'element' parameter for Postgres SQL
when we are trying to insert log files in the postgres sql we are facing the issue:
log4net:ERROR ConfigureFromXml called with null 'element' parameter.
In this code we are trying to insert log files ...