We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SeriLog: Basic configurations of SeriLog
Sinks: Which helps in storing the logs into specific type of storage systems
Basic Settings
var template = "{Timestamp:yyyy-MMM-dd HH:mm::ss} [{Level}] {Message}{NewLine}{Exception}"; var _logger = new LoggerConfiguration() .WriteTo.Console() .WriteTo.ColoredConsole(Serilog.Events.LogEventLevel.Verbose, outputTemplate: template) .WriteTo.File("log.txt") .WriteTo.RollingFile("rollinglogfile.txt", retainedFileCountLimit: 2) .CreateLogger(); Log.Logger = _logger; Log.Logger.Information("Log Message");