Hi,

I'm not a log4cxx expert at all, but this should work by default.
AFAIK, the code in a DLL is always executed in the process space of the calling 
process. I.e. two different executables, even though they are using same code 
from a same DLL will always have their code executed in a completely separate 
and isolated process environment.
This is not something the log4cxx code has to care about, instead the mechanism 
is provided by the OS, out-of-the-box.
So for a given log4cxx logger (instantiated in the DLL code), there are 
actually different logger objects living in the different process environments 
and will be logging to whatever appender has been specified in their respective 
environment (by the executable code).

Hope this answers your question.
Regards,
Lars Ruoff


From: Hearne, S (Sean) [mailto:sean.hea...@rabobank.com] 
Sent: lundi 12 janvier 2015 13:56
To: 'log4cxx-user@logging.apache.org'
Subject: LOG4CXX Common DLL Logging

This is a simplified descriptions of an issue I have with log4cxx logging:
common.dll is used by two executables: prog1.exe and prog2.exe
The executables have separate log files prog1.log and prog2.log
Is it possible to have the logging from common.dll included in the log file of 
the executable that calls it?
 
Sean
 
 
 
________________________________________
This email (including any attachments to it) is confidential, legally 
privileged, subject to copyright and is sent for the personal attention of the 
intended recipient only. If you have received this email in error, please 
advise us immediately and delete it. You are notified that disclosing, copying, 
distributing or taking any action in reliance on the contents of this 
information is strictly prohibited. Although we have taken reasonable 
precautions to ensure no viruses are present in this email, we cannot accept 
responsibility for any loss or damage arising from the viruses in this email or 
attachments. We exclude any liability for the content of this email, or for the 
consequences of any actions taken on the basis of the information provided in 
this email or its attachments, unless that information is subsequently 
confirmed in writing. 
________________________________________

Reply via email to