logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Lidström <daniel.lidst...@sbg.se>
Subject Windows: Placing logfiles in Documents and Settings
Date Wed, 12 Sep 2007 12:20:16 GMT
Hi!

I want to place logfiles in the Documents and Settings/User/Local
Settings/ApplicationData folder.
This folder might be called something else under a spanish Windows. So I
have to determine the
path during runtime (done with
System.Windows.Forms.Application.UserAppDataPath). However, since
I put logging in a .dll assembly (with no Main, thus no best place to call
XmlConfigurator),
I would like to use the XmlConfigurator attribute.

Is there some way to specify this directory for my logfiles? If possible, I
would like to do it
by using assembly attributes.

If this isn't possible, what solution is the recommended? I can think of one
that would work:
create a static constructor in the first class that gets instantiated. This
constructor would
create the XmlConfigurator.

Hälsningar,
Daniel
SBG AB

Phone: +4687112090
Fax  : +4687112098
Location:
       59 14'10" N
       18 00'09" E

Mime
View raw message