Hi Friends,
I am very new to Nlog, I have got assigned task to implement exception and Audit log using Nlog. Based on my knowledge i have created one static class having Error and Info static info methods,
I am using GetLogger("Name") in each methods to point particular target like eventviewer for different layout.
I am using GetLogger("Name") in each methods to point particular target like File for different layout.
is this approach is correct or any suggestions.
please reply me.
Hi Friends,
I am very new to Nlog, I have got assigned task to implement exception and Audit log using Nlog. Based on my knowledge i have created one static class having Error and Info static info methods,
I am using GetLogger("Name") in each methods to point particular target like eventviewer for different layout.
I am using GetLogger("Name") in each methods to point particular target like File for different layout.is this approach is correct or any suggestions.
please reply me.
Hi, first of all please use guidlines for asking and formulating questions, please update your question.
As I understand you just need output _Info_ to AuditLog and _Errors_ to ErrorLog?, If I am right, check out Rules and if it works for you, I wouldn't create new class just for two methods to pass a message, I would use NLog Fluent API.
The Wiki is a good place to start: https://github.com/NLog/NLog/wiki/Tutorial
I assume your question has been answered, if not, please let us know!