Classes
Log | The Log class provides centralized logging support for your application or library. It allows you to configure logging either through a JSON configuration file (appsettings.json) or by dynamically setting up a logger using the ConfigureLoggerFactory(Action<ILoggingBuilder>) method. How to enable Logging: There are two primary ways to enable logging:
Option 1: Using appsettings.json Place anappsettings.json file in your project directory with the following structure:
Option 2: Using ConfigureLoggerFactory Configure the logger dynamically in your code:
Using the Logger After configuring the logger, you can create log instances and log messages as follows:
Note: You can also directly set a custom logger factory using the Instance property, though it is not the recommended approach. Using ConfigureLoggerFactory(Action<ILoggingBuilder>) or the appsettings.json approach is preferred. |
Logger | A concrete logger implementation used by Yubico .NET-based libraries. |
LoggerExtensions | Logger extension methods for common scenarios. |