Questions tagged [common.logging]

Common Logging is an Apache project that provides a consistent interface for Logging Implementations in Java. It has been ported to .NET as a SourceForge project.

87 questions
24
votes
8 answers

Failed obtaining configuration for Common.Logging from configuration section 'common/logging'

I'm trying to configure a console application with the following logging assemblies: Common.Logging.dll (2.1.0.0) Common.Logging.Log4Net1211.dll (2.1.0.0) log4net.dll (1.2.11.0) If the logger gets configured programmatically then everything…
jdecuyper
  • 3,934
  • 9
  • 39
  • 51
21
votes
3 answers

Are there any alternatives to Common.Logging?

EDIT: Common.Logging 2.1.1 was released on June 9, 2012 and the Github page is fairly active, with the author commenting specifically on the health of the project. We're looking at using Common.Logging in a new .NET project but I'm a bit concerned…
Tom Robinson
  • 8,348
  • 9
  • 58
  • 102
17
votes
1 answer

How can I keep nuget from updating dependencies?

I'm attempting to install a nuget package which has incorrectly specified one of it's dependencies. Common.Logging.Log4Net requires log4net = 1.2.10 however the nuget package specifies log4net >= 1.2.10. Even if I manually install the older…
JeffreyABecker
  • 2,724
  • 1
  • 25
  • 36
13
votes
1 answer

In C# should my Common.Logging logger be an instance member or static?

Looking a project that uses Common.Logging for .NET, I noticed that some classes declare the logger instance as a class static member. For instance: public class HelloJob : IJob { private static ILog _log =…
Fernando Correia
  • 21,803
  • 13
  • 83
  • 116
11
votes
1 answer

Common.Logging config exception

I'm getting the following exception when I try to call var log = LogManager.GetLogger(this.GetType()); A first chance exception of type 'Common.Logging.ConfigurationException' occurred in Common.Logging.dll An unhanded exception of type…
James John McGuire 'Jahmic'
  • 11,728
  • 11
  • 67
  • 78
11
votes
3 answers

NLog dynamically change filename using NLog.config

How to dynamically change the FileName using a variable from C#? My idea is to create a log file like Log__${date:format=yyyy-MM-dd}.log. Any ideas?
gjfonte
  • 488
  • 2
  • 4
  • 15
10
votes
2 answers

How can I successfully configure Common.Logging?

I'm attempting to use NuGet packages to configure Common.Logging to use NLog2 in an ASP.Net MVC project. Based on the information provided at the URLs below, I believe my loggers are configured properly, but I continue to get configuration…
Peter Bernier
  • 8,038
  • 6
  • 38
  • 53
9
votes
2 answers

Can NLog v2 be used with Common.Logging

I tried using these together today, and was getting a version mismatch, as it's looking for NLog v1. Does Common.Logging support NLog v2 yet? If not, does anyone know if an assembly version redirect can safely be used?
UpTheCreek
  • 31,444
  • 34
  • 152
  • 221
8
votes
4 answers

The type initializer for 'NHibernate.LoggerProvider' threw an exception

I am trying to use the Common.Logging assembly to replace the default nHibernate Log4net logging. I added a reference in my project to: Common.Logging.dll v2.0 NHibernate.Logging.CommonLogging.dll v1.2.0.4000 and then added the following to my…
user887732
  • 81
  • 1
  • 2
8
votes
2 answers

Common Logging Could Not Load Type NLog.TargetWithLayout

I've got a Wpf .net 4.0 C# project that I am attempting to migrate from using Log4Net to using NLog as the logging library behind the Common.Logging Façade. I had expected this to be an easy task, but you know what they say, Nothing is ever easy. I…
Klee
  • 2,022
  • 3
  • 23
  • 32
7
votes
3 answers

How do I switch from Log4Net to NLog in Quartz.Net?

My company's standard logging tool is NLog. I'm trying to introduce Quartz.net and was asked if it could use NLog instead of Log4Net. I know I can recompile to use NLog, but I'd like to do it from the configuration files if at all possible.
Brad Bruce
  • 7,638
  • 3
  • 39
  • 60
7
votes
3 answers

Quartz.Net - Common Logging with log4net

I'm trying to implement Quartz.Net. As long as there is no logging configured everything works (the debug output shows "no configuration section found - suppressing logging output"). When logging is enabled I'll get the following error: Failed…
DirkV
  • 353
  • 1
  • 4
  • 16
6
votes
3 answers

Common.Logging with multiple factory adaptors

I am currently working on moving a large project over to use Common.Logging and I was hoping to be able to output logging events to more than one 3rd party logging implementation. We currently have an internally developed tracing library that we…
omockler
  • 157
  • 1
  • 8
6
votes
2 answers

Log levels: Would you consider DEBUG finer than TRACE?

My question originates from this question, where one of the comments suggests that a DEBUG log level is finer grained than TRACE. Looking at what TRACE and DEBUG means in .NET, this seems to make sense, since, by definition, DEBUG (as a concept) is…
Werner
  • 1,229
  • 1
  • 10
  • 24
5
votes
1 answer

Could not load file or assembly Common.Logging

I wrote class library to support writing a log using NLog and log4net with Common.Logging. When I test with project I get error Could not load file or assembly 'Common.Logging, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e' or…
1
2 3 4 5 6