[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4net-user
Subject:    Windows: Placing logfiles in Documents and Settings
From:       Daniel_Lidström <daniel.lidstrom () sbg ! se>
Date:       2007-09-12 12:20:16
Message-ID: E1F34343C3A0804BB3E29ABBFCBBAF0C296349 () ada ! sbg ! se
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic