-
Notifications
You must be signed in to change notification settings - Fork 9
Platform specific: NLog
Ioan Crisan edited this page Dec 8, 2016
·
3 revisions
The implementation complexity is hidden under the Tnsa.Foundation.Logging.NLog namespace.
This builder class is used to adapt the NLog manager and expose the implemented ILogManager interface to the ambient services.
- Service contract: ILogManager
- Instancing: singleton
- Mode: single
Remarks: this class is normally not used as such, but through the
AmbientServicesBuilder's extension methods (see below).
This static class provides convenience methods for initializing the logging infrastructure in the ambient services.
var ambientServicesBuilder = new AmbientServicesBuilder().WithNLogManager();
var myClassLogger = ambientServicesBuilder.AmbientServices.LogManager.GetLogger<MyClass>();