This is typically handled using filters or rules. Can you tell me what determines which log messages go where? Is it based on the name of the class that emits the log messages?
Jarek
On Thu, Sep 24, 2009 at 1:35 AM, Sandeep Patil (via Nabble) - No Reply
<[hidden email]> wrote:
Hi,
I would need some help on using NLog for the below scenario.
I would like to log certain messages to one log file and certain other messages to another log file.
I also want to be able to write to these files from any assemblies my application has.
I used the 'LogManager.GetLogger("..")' and used the methods of this class to write logs. Using this i could write log messages to all configured output targets but there is no option to write some messages to write to one output target and some others to another output target. This can be done from any of the application assemblies.
To some extent the above problem got solved using 'LogFactory.GetLogger("..")' and configuring each LogFactory instance to use a different configuration i could write messages selectively to different log files( all this was done in same assembly). But am not very sure how can i do the same when logging from different assemblies is involved.
Can someone please guide me.
Thanks,
Sandeep