Two suggestions:

1. The right way: In your service's admin program (I'm assuming it has one?) 
include support for cranking logging up and down using a drop-down box on the 
GUI, and sending the info to the service program which modifies the XML config 
file. This requires support in the admin program and the service program, but 
makes things very user-friendly - the customer does not even need to copy a 
settings file, they just crank logging up, wait a while, crank logging down and 
send you the log file.

2. A possible quick-and-dirty solution: Send your customers two XML config 
files, one to start logging and one to stop it. 

Rennie


> -----Original Message-----
> From: Aleš Vojáček [mailto:[EMAIL PROTECTED] 
> Sent: 17. juli 2008 14:11
> To: [email protected]
> Subject: XML configuration, windows service
> 
> Hi all,
> I'm using
> 
> [assembly: log4net.Config.XmlConfigurator(ConfigFileExtension 
> = "conflog", Watch = true)]
> 
> in AssemblyInfo.cs
> 
> Almost everything works fine.
> When I started service without config file there is no 
> problem, simply service does not generate log.
> Then I add config file into service directory, again 
> everything works fine, it starts logging.
> If I change config file then the configuration change and 
> again everything is ok.
> 
> But when I delete config file then service still loging, I 
> hoped that it stops logging.
> 
> How to do that, I know that it can be done using change 
> config file instead of deleting it, but I need some more 
> simple solution, because it wil be used by our customers 
> which has no knowledge about editing files. 
> I hoped that I will send them config file, which they simply 
> copy into app directory, then they send me log file back and 
> then delete config file. All without restarting service.
> 
> Can you someone help me with that?
> 
> A.
> 
> 

Reply via email to