Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
57 views

AsyncForwardingAppender - Buffer overflow Log4net c#

Team, I got the following error frequently when I am using the below appender, AsyncForwardingAppender - Buffer overflow. 1 logging events have been lost in the last 30 seconds. [BufferSize: 1000] <...
bala n's user avatar
  • 39
0 votes
0 answers
17 views

Can we customize RollinFileAppender for log4Net to achieve desired naming pattern

I want to achieve a specific naming pattern for the log files generated by RollingFileAppender. my current configuration <appender name="LiveTouchAppender" type="log4net.Appender....
Binayak Purohit's user avatar
1 vote
1 answer
104 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,962
0 votes
0 answers
28 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
31 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
0 votes
0 answers
37 views

Create log4net Fallback function C#

Am new to this topic and trying to create a fallback functionality on failure of log4net. and ofcs I have gone through few posts that is related to this topic. https://moaid.codes/post/writing-...
Udk's user avatar
  • 99
0 votes
1 answer
85 views

Config file setting for Multi appenders(file and app insight) with different log level

I have requirement to log to file as well as app insight with different log levels. I have below config file setting which logs with DEBUG level in both file as well as app insight. <?xml version=&...
Sumanth Shendye's user avatar
0 votes
1 answer
113 views

log4net configure same appender for two dll namespaces

I would like to understand how can I configure the same appender for two different namesapaces. I have: WPF.Client.Foo class in first dll WPF.Server.Foo class in second dll I want all logs in both ...
Alex's user avatar
  • 57
0 votes
0 answers
40 views

Using log4net to log everthing in app console

Is it possible to configure log4net in config File to catch and trace every action or error in runtime, without programmatically add logging messages in the Code ? Im using .net core console ...
Harimoh's user avatar
0 votes
0 answers
170 views

log4net appender logging to snowflake table

I'm trying to use log4net appender and log into snowflake table. But it's not working. Not sure what the connectiontype should be. Below the code I have tried. <appender name="AdoNetAppender&...
spookky's user avatar
  • 41
0 votes
0 answers
83 views

Log4Net creating empty Log file

Hi I am trying to write my console output to a log file and i only see it created a log file but it is not writing anything into the log file. Please find the below attached App.config and ...
madhurima's user avatar
0 votes
1 answer
219 views

looks like log4net Seq logging requires 2 (!) XmlConfigurator.ConfigureAndWatch calls

i observe a strange behavior when using Seq.Client.log4Net (3.1.0) on .NET 6 : logging to the Seq Server seems to work only if I call XmlConfigurator.ConfigureAndWatch before and after calling the log ...
Daniel Devo's user avatar
1 vote
1 answer
111 views

C# Collect all Errors and send one Email when Programm is finished using log4net

Is there a way to collect all exceptions with the level value Error and combine them into one E-Mail? Currently I will get one E-Mail for each Log.Error(ex) in my programm. Edit: I know that the ...
Saiko's user avatar
  • 112
0 votes
1 answer
56 views

Log4Net on multiple nodes behind loadbalancer overwrite previous day rolling files

We are using the RollingFileAppender in a web-applicfation running behind a load-balaner on multiple nodes. We noticed that logs of previous days often are very small, only a few lines, while the ...
Louis Somers's user avatar
  • 2,935
0 votes
1 answer
306 views

Add custom fields in Log4Net PatternString

I'm working on getting my logging pattern into a standard set by my company and could use some help. I need to log from my application into JSON, so I put together a Json layout that extends the ...
idonaldson's user avatar
0 votes
0 answers
39 views

Find the object that implements a specific interface

I am writing a log4net Appender and this appender needs the object of the framework of the app initializing log4net. This framework implements a specific interface. While XmlConfigurator.Configure() ...
David Thielen's user avatar
1 vote
1 answer
540 views

log4net managedcoloredconsole not working with dynamic creation

I have a program that has a different set of modules called based an input parameter. Modules like Orders, Shipments, Pricing etc. I wrote a logging class with log4net being the foundation though ...
j.hull's user avatar
  • 440
1 vote
1 answer
153 views

How can I specify an absolute file path in log4net, with a datePattern?

I want log files to be written to a directory where log files are kept. I'm using a RollingFileAppender with a datePattern. Here is what I have that doesn't work: <?xml version="1.0" ...
Shawken X's user avatar
1 vote
0 answers
72 views

Log4net: Filter by a specific property from GlobalContext doesn't seems to be working. How can I set it and use in PropertyFilter correctly?

I'm trying to create a filter in FileAppender that will log just information filtered by 'ApplicationName'. I set the GlobalContext property in main Program and then I tried to use it in the filter ...
Jairo Franchi's user avatar
2 votes
1 answer
1k views

How to send Log4Net logs to Application Insights for .NET Core 3.1 web application?

Not able to flush Log4Net logs to azure application insights in the web app for net core 3.1 Here're the project files. log4net.config <?xml version="1.0" encoding="utf-8"?> &...
Anurag Chugh's user avatar
1 vote
0 answers
174 views

Log4net adonetappender not working in .net 5

In a .net 5 worker service project, I have configured the log4net. All other appenders working fine except adonetappender. There is no error which is occurring and if I see the list of appenders in ...
Raghavendra C's user avatar
0 votes
1 answer
48 views

How to remove last filter from appender?

How can I remove last filter from an appender in runtime? I can clear the filters, I can add a filter, but both methods alter private property m_tailFilter so when I set the Next property to null for ...
Matus's user avatar
  • 437
0 votes
0 answers
553 views

Log4net not inserting data into the oracle database?

I tried using log4net for logging info into db and I stuck with it now.Not sure what I am doing wrong.Whatever message i send its not received in the database,neither shows any error My logger.config ...
Konda Reddy's user avatar
1 vote
0 answers
155 views

Log4Net with Unity: Where do appender files get saved?

I can't seem to save my file into the Logs directory just under the project directory. The one that every Unity comes with by default. Sample code var fileAppender = new FileAppender ...
Lil boat's user avatar
  • 139
1 vote
2 answers
1k views

log4net logging error in mysql database logging

i am using log4net for logging in mysql database. log4net configuration is correct and because i have tested to log in sql server and in file but when i'm writing logs in mysql database then it prompt ...
hashimkayani's user avatar
1 vote
0 answers
42 views

How to rename folders dynamically using multiple appender in log4net?

How to configure log4net which it has two appenders in App.config. the first appender works and i succeeded to find out how to send parameter to %property{LogFolderName} but when i tried to configure ...
Hamza Khadhri's user avatar
0 votes
1 answer
261 views

log4net logs getting generated in wrong file

I want to have a different log for a specific part of a program, hence I created a new logging system in C#.NET using log4net. I have created a new node in app.config same as the one that is existing (...
Hope Michaelson's user avatar
0 votes
1 answer
791 views

log4net RollingFileAppender stops working after deployment

My aps.net core application is running fine and generating logs and rolling them each day, however as soon I deploy a new version of the app to IIS it stops logging and also stops rolling. It only ...
Ackdari's user avatar
  • 3,488
0 votes
1 answer
126 views

Log4Net c# AdoNetAdapter Additional Fields

I have seen multiple links on how to do this and my version is techically working. Example: Example So, I have added a new property, Unit_Name, to my code. for (int i = 0; i < 5; i++) { log4net....
gilesrpa's user avatar
  • 1,061
-1 votes
2 answers
187 views

'SmtpPickupDirAppender' does not contain a definition for 'SmtpHost' and no accessible extension method 'SmtpHost' accepting a first argument

I have this piece of code in .net framework class library project, I want to reuse it in.net standard class library project. It works as expected, but gives compilation error in .net standard project. ...
Vivek Nuna's user avatar
1 vote
2 answers
2k views

How to solve log4net:ERROR Could not create Appender [aiAppender] of type

I have .net core 3.1 console application which is referring to a .net class library project. I am getting the below exception. log4net:ERROR Could not create Appender [aiAppender] of type [Microsoft....
Vivek Nuna's user avatar
0 votes
0 answers
152 views

The custom Logger is giving error when call from another project in solution

I have created a class for customLogger to log the data and made a change in the web.config file for the same <log4net> <root> <level value="ALL"/> <appender-ref ...
Srikrishna Sharma's user avatar
0 votes
1 answer
291 views

How to give testcase name to log4net log file for every separate test case

I tried implementing log4net for my automation framework. I have not written the XML config file. I have used code file only for configuring it. class log4netHelper { private static ILog ...
Anuj Mittal's user avatar
1 vote
0 answers
37 views

Log4Net Backup Appender [duplicate]

I am running Log4Net in a .NET CORE 3.1 web app. I have almost everything the way I want it. There is one thing that is eluding me though. I have an appender that logs to my SQL Server DB. If and ...
Dan Gifford's user avatar
0 votes
1 answer
326 views

C# - How to use another project logging configuration into current project?

I have 12 projects in my solution file. There are most Windows services (ServiceProj_1, ServiceProj_2, ...) and one project is of web application (WebApp). I use log4net for logging. WebApp and ...
darthVader's user avatar
2 votes
0 answers
310 views

Log4ALA doesn't create log on Azure Log Analytics

I have a web API application in C#. I use log4net to log errors. Now I need to log errors also on Azure Log Analytics. To do this I use https://github.com/ptv-logistics/Log4ALA. I configured ...
erikscandola's user avatar
  • 2,936
0 votes
1 answer
864 views

Log4net buffer not flushing when full in lossy setup

I'm using Log4net ElasticSearchAppender in my C# webAPI with a BufferSize of 10 and Lossy set to true to preserve performance, as seen here : https://github.com/bruno-garcia/log4net.ElasticSearch/...
XouDo's user avatar
  • 971
0 votes
1 answer
184 views

Two log4net configuration files on same solution

I have an solution which consist of multiple projects.its a desktop application I need to have two separate log4net configurations for those projects since one project contains a library that uses ...
Pubudu Ranathunga's user avatar
0 votes
1 answer
118 views

How to detect trace file rolling on log4net

I am using C# 4.6.1. Let's assume I have successfully configured a log4net.Appender.RollingFileAppender, which will roll to a new trace file after a certain time or when the trace reaches a certain ...
Silverman's user avatar
  • 307
0 votes
0 answers
700 views

Console Output In Web Application

I had created a web application in .net framework. and for logging, I had used log4net package which I configured in the Web.config file. Here is the code regarding the appenders used in the code. &...
Srikrishna Sharma's user avatar
0 votes
1 answer
585 views

Log4Net Console Appender in C# WPF Application

I have a WPF application, where RollingFileAppender works fine in logging the messages to a log file. However I am trying to retrieve only INFO level logs and display them in a WPF window. I have ...
Aishwarya Das's user avatar
0 votes
2 answers
3k views

Why doesn't Microsoft.Extensions.Logging.Log4Net.AspNetCore support AdoNetAppender and are there plans for it to?

I am using Microsoft.Extensions.Logging.Log4Net.AspNetCore (AspNetCore 2.2) and I want to use an AdoNetAppender but it seems like the only option is to make my own or use MicroKnights....
Soenhay's user avatar
  • 4,048
0 votes
1 answer
2k views

Log4net configuration file path from a key in app.config

I have a created a custom log component class library which uses log4net. I want to have the log4net configuration file path to be read from a key in app.config. so app.config will have a key "...
Navaneet's user avatar
  • 1,387
1 vote
1 answer
651 views

C# - How to use log4net property assignment to create distinct log files for one (or more) Tasks running simultaneously?

I've tried searching for this in Google and came across this SO question. Although it's partially what I want, the fact that I'm using tasks complicates the issue a bit, as I'll explain. So, what I ...
Fredulom's user avatar
  • 928
0 votes
0 answers
42 views

Generating a custom Sitecore log on a button click

Can we generate a custom log file in Sitecore on a button click() event? I know the concept of creating Sitecore custom log files on per day to day basis, but I am not able to generate the log file ...
Ritu Suman's user avatar
0 votes
1 answer
234 views

log4net console appender logs viewing in .net core windows service application

Have anybody used console log4net appender in .net core based windows service application? I am using .net core 2.1.6 console application which is hosted inside windows service. I have a file appender ...
Kamran Shahid's user avatar
0 votes
1 answer
29 views

Log4Net Separate Configurations per Addin

I am using Log4Net for several pieces of software I'm writing, all of what are addins to a 'parent' software. It is logging, however the log files are getting intermixed... I would like to have a ...
sfaust's user avatar
  • 2,343
0 votes
0 answers
197 views

Dynamic file path for logging using log4net

I have two classes(A,B) and multiple threads are running. and one global variable in Class B, i am creating object of class B from class A B objB = new B(_istry); _istry is global variable in Class ...
Mohammad Sarfaraz's user avatar
0 votes
0 answers
46 views

I would like to insert data into sql table from append logs while using smslib

I made a java application for sending SMS via Huwei Modem. Everything is working properly. I used netbeans for making this java application. According to this application, logs data will appear in ...
Umair Zubairi's user avatar
0 votes
0 answers
2k views

log4net AdoNetAppender Npgsql throws 42601: syntax error at or near ":"

I got a problem trying to write my log4net logs to Postgres Database. .NET 4.6.2 project, PostgreSQL 11, Npgsql 4.0.7 My config: <log4net debug="true"> <appender name="...
Conder's user avatar
  • 11

1
2 3 4 5 6