Davids Interblag Gesammelte Werke.


log4net: GetAllAppenders()

Returns a List of the IAppender Interface, which actually contracts:

string Name { get; set; }
void Close();
void DoAppend(LoggingEvent loggingEvent);

        public static List<log4net.Appender.IAppender> GetAllAppenders()
            List<log4net.Appender.IAppender> appenders = new List<log4net.Appender.IAppender>();

            log4net.Repository.Hierarchy.Hierarchy h = (log4net.Repository.Hierarchy.Hierarchy)log4net.LogManager.GetRepository();

            foreach (log4net.Repository.Hierarchy.Logger logger in h.GetCurrentLoggers())

            return appenders;

I recommend to check (or at least output) all appenders at the beginning of each project you use log4net!

Kommentare (0) Trackbacks (0)

Zu diesem Artikel wurden noch keine Kommentare geschrieben.

Leave a comment


Noch keine Trackbacks.