The program uses Serilog for logging which is a powerful extensible library.
win-acme uses the following five log levels:
Error
- Logs fatal or dangerous conditionsWarning
- Logs minor errors and suspicious conditionsInformation
- General information about operationsDebug
- Additional information that can be useful for troubleshootingVerbose
- Full logging for submitting bug reportsYou can change the log level by adding the following setting:
<add key="serilog:minimum-level" value="Verbose" />
event
sink writes to the Windows Event Viewer includes Error
, Warning
and selected Information
messages.disk
sink writes rolling log files to %programdata%\win-acme\$baseuri$\Log
(that path can be changed in settings.json)There are many types of output channels called sinks for all kinds of different databases, file formats and services.
Serilog.Sinks.PeriodicBatching.dll
and Serilog.Sinks.Seq.dll
from NuGet. These files can be found
here and
here, respectively.serilog.json
according to the specification here.The follow piece of code in serilog.json
adds the process ID to the output of the file log.
{
"disk": {
"WriteTo": [
{
"Name": "File",
"Args": {
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] [PID:{ProcessId}] {Message:lj}{NewLine}{Exception}"
}
}
]
}
}