-
Notifications
You must be signed in to change notification settings - Fork 3
Logger
Kirill edited this page Jun 6, 2020
·
7 revisions
var dependencyProvider = new DependencyCollection()
.AddLogger() // logger infrastructure
.AddDefaultConsoleLogWriter(LogLevel.Debug) // write logs to console output
.AddDefaultFileLogWriter("mylogs.log") // write logs to file
.AddDefaultLogEnrichers() // log level, sender, timestamp
.BuildProvider();
var logger = dependencyProvider.Get<ILogger<BooRepository>>();
_logger.Debug("My log message with {arg1}, {arg2} and more", arg1, arg2);