15 Jun 2007 16:54
Re: Reading config in business layer
Danny Gorton <danno <at> bushidosoftwareprojects.com>
2007-06-15 14:54:35 GMT
2007-06-15 14:54:35 GMT
Jay,
It should read the configuration file from the application that hosts
your class assembly (DLL). Assemblies do not load their own configuration.
Danny
Gulati, Jay, GCM wrote:
>
> Hi,
>
> I have asp application and writing new module in asp.net; how can I
> use config settings for appender? I like to use rollfileappender.
>
> I module is class library and tried to add app.config and app.log4net
> but it's not exe or web so can't read the configuration.
>
> So my question is how to set xmlconfigurator to read config file?
>
> Here is my test class and config file (simple)
> using System;
> using System.Collections.Generic;
> using System.Text;
>
> using log4net;
> using log4net.Config;
>
> [assembly: log4net.Config.XmlConfigurator(Watch = true)]
> namespace busLayer
> {
> public class Class1
> {
(Continue reading)
RSS Feed