V.V
V.V

Reputation: 883

need to refer log4net config file in AssemblyInfo

I use following code for refer the App.Config File in AssemblyInfo.cs for create log file.

[assembly: log4net.Config.XmlConfigurator(ConfigFile = @"C:\Users\Projects\Model\App.config", Watch = true)]

I dont want to give Full path details in AssemblyInfo.cs page.Because it will change by system wise.How to refer the file without giving full path? For example using like

../../ or ~/ 

Upvotes: 2

Views: 7176

Answers (1)

GinjaNinja
GinjaNinja

Reputation: 806

The following code in AssemblyInfo will instruct Log4Net to configure using your App.Config:

[assembly: log4net.Config.XmlConfigurator(Watch = true)]

Upvotes: 4

Related Questions