Re: Log4Net API to get appender config properties

2004-12-08 Thread Oliver Sturm
Hey Nicko, Nicko Cadell wrote: Interfaces have been used to allow alternative implementations to be substituted. At the current time there are no alternative implementations of ILoggerRepostiroy and ILogger in the log4net source, however you could supply your own alternative implementation, which w

RE: Log4Net API to get appender config properties

2004-12-08 Thread Nicko Cadell
Oliver, > > log4net.Repository.Hierarchy.Hierarchy h = > >(log4net.Repository.Hierarchy.Hierarchy)log4net.LogManager.Ge > tLoggerRepository(); > > > > > Why do you assume that this ILoggerRepository is really a Hierarchy? Currently the only implementation of the ILoggerRepository interface is

Re: Log4Net API to get appender config properties

2004-12-08 Thread Oliver Sturm
Hey Nicko, you may have noticed that you answered my recent question ("Finding out whether a specific appender is attached") with this, too (although I haven't tried it yet). Just two comments inline below: Nicko Cadell wrote: You can get all the current appenders by using a method like: public

RE: Log4Net API to get appender config properties

2004-12-08 Thread Nicko Cadell
You can get all the current appenders by using a method like: public static log4net.Appender.IAppender[] GetAllAppenders() { ArrayList appenders = new ArrayList(); log4net.Repository.Hierarchy.Hierarchy h = (log4net.Repository.Hierarchy.Hierarchy)log4net.LogManager.GetLoggerRepo sitory(); a

RE: Log4Net API to get appender config properties

2004-12-04 Thread Andrew Elmhorst
Sure, here’s a quick code snippet . .   This will get you the appenders that have been appended to the root of the hierarchy.   IAppender fileApp = null; IAppender consoleApp = null; log4net.Repository.Hierarchy.Hierarchy hierarchy = LogManager.GetLoggerRepository() as log4net.Reposi