Skip to content

microknights/Log4NetHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log4NetHelper

Some helper methods for Log4Net on the .Net Standard platform.

AdoNetAppenderHelper

Now it is possible to set the connectionstring directly at runtime, instead of ConnectionStringName and/or ConnectinStringFile.

Simply call:

AdoNetAppenderHelper.SetConnectionString(configuration.GetConnectionString("log4net"));

Do this call immediately after log4net.Config.XmlConfigurator.Configure()

InternalDebugHelper

Enable (and disable) internal debugging of Log4Net.

InternalDebugHelper.EnableInternalDebug((source, args) =>
{
    Console.WriteLine(args.LogLog);
});

ConfigurationHelper

List all configuration messages

foreach (var log in ConfigurationHelper.ListConfigurationMessages())
{
    Console.WriteLine(log);
}

See also how to bring Log4NetAdoNetAppender to live on the .Net Standard platform here: https://github.com/microknights/Log4NetAdoNetAppender

About

Some helper methods for .Net Standard

Resources

License

Stars

Watchers

Forks

Packages

No packages published