Logging
Logging is a common aspect used in every application. ASP.NET Core provides a simple yet efficient logging system. It can be integrated with popular logging libraries such as NLog, Log4Net, and Serilog.
Serilog is a widely used library that provides many options for the log target, including console, text files, and Elasticsearch. ABP startup templates come with the Serilog library pre-installed and configured. It writes logs into a log file in the Logs
folder of the application. So, you can directly use the logging system in your services. If you need, you can configure Serilog to write logs to different targets. Please refer to Serilog's documentation to configure the Serilog options. Serilog is not a core dependency of ABP Framework. All the configuration is included in the startup template. So, if you like, you can easily change it with another provider.
The ILogger<T>
interface is used to write logs in ASP.NET Core, where T
is typically your service type...