-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: added logging #94
feat: added logging #94
Conversation
Added serilog Added logging output option Added logging level option Added logging option binder Replaced console write line to logger Added logger configuration to cli commands SlavaVedernikov#21
Added command line builder Added logging middleware
Added validation error Updated strategies to use validation error Log validation errors
@@ -19,7 +24,9 @@ public class PublishSiteCommand : Command | |||
var environmentVariablesOption = EnvironmentVariablesOption.Get(); | |||
var siteContentSubDirectoriesOption = SiteContentSubDirectoriesOption.Get(); | |||
var siteNoSitemapSubDirectoriesOption = SiteNoSitemapSubDirectoriesOption.Get(); | |||
|
|||
var loggingLevelOption = LoggingLevelOptions.Get(); |
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.
I think this can be removed now.
@@ -20,7 +21,7 @@ public ConcurrentProgress(int itemsCount) | |||
ItemsCount = itemsCount; | |||
Progress = new Progress<int>(i => | |||
{ | |||
Console.WriteLine($"Processed {i} out of {ItemsCount} items"); | |||
Log.Debug("Processed {ItemNumber} of {ItemsCount} items", i, ItemsCount); |
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.
Change this to Information
@@ -110,7 +112,8 @@ public IEnumerable<string> ResolveStructures(IEnumerable<string> aliases) | |||
} | |||
else | |||
{ | |||
Console.WriteLine($"Resolving wildcard Structures for '{item}'."); | |||
Log.Debug("Resolving wildcard Structures for {Structure}", item); |
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.
Change to
Log.Information("Resolving wildcard Structures for {Path}", item);
Added serilog
Added logging output option
Added logging level option
Added logging option binder
Replaced console write line to logger
Added logger configuration to cli commands
#21