-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Now using Microsoft.Extensions.Logging.Console as the default logger #139
Conversation
Test Results: Windows 2 files 2 suites 4s ⏱️ Results for commit d40d837. ♻️ This comment has been updated with latest results. |
Test Results: Ubuntu 2 files 2 suites 9s ⏱️ Results for commit d40d837. ♻️ This comment has been updated with latest results. |
Test Results: MacOS 2 files 2 suites 4s ⏱️ Results for commit d40d837. ♻️ This comment has been updated with latest results. |
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is the meat of the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Summary
This change introduces ´Microsoft.Extensions.Logging.Console´ as the new default logger. The reason for this change is to allow for easier logging output when using the SDK. For example. the integration tests and all other users will now have logging on by default. Previously, you had to set up logging for each specific test or application, whereas now, in the case of printing to the console, this is handled by the Log.cs class, as well as some configuration in the new appsettings.json.
To enable logging from a dependent project (e.g. unit tests, integration tests, your cool app), you have two options.
Add an appsettings.json to your project1
Use the ConfigureLoggerFactory
Fixes: https://yubico.atlassian.net/browse/YESDK-1361
Type of change
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test configuration:
Checklist:
dotnet format
to format my codeFootnotes
Make sure your appsettings.json is copied to build output ↩
See Yubikey models (Multi-protocol, Security Key, FIPS, Bio, YubiHSM) ↩