> Example 1
>
> We have exe App1.exe that uses Component1.dll. When App1.exe does not call 
> any function in Component1.dll, when log file name is generated correctly 
> (e.g. “Greenrain Connect 2011-10-21.log”). As soon as App1.exe calls 
> functions from Component1.dll, the log file name gets duplicated (e.g. 
> “Greenrain Connect 2011-10-21.log Greenrain Connect 2011-10-21.log”).
>
>

See: 
http://stackoverflow.com/questions/579688/why-is-the-date-appended-twice-on-filenames-when-using-log4net
It may be a file permission issue. If you're running it as a service
under NETWORK_SERVICE, you may want to follow the answer there and
give it more permissions. If file permission proves to be the problem
here, and if security is very important, you might want to create a
limited user account, grant it the minimum working set of permissions
and run your service under this user account.

> Example 2
>
> We have two applications App1.exe and App2.exe that both write logs into the 
> same log file. In this case we get log file with correct name (e.g. 
> “Greenrain Connect 2011-10-21.log”) and second log file with duplicated name 
> (e.g. “Greenrain Connect 2011-10-21.log Greenrain Connect 2011-10-21.log”).
>
>

See "How do I get multiple process (sic) to log to the same file?"
here: http://logging.apache.org/log4net/release/faq.html
There's some advice there to follow.

Reply via email to