Skip to content
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

Merged
merged 8 commits into from
Aug 14, 2024
Merged

Conversation

AlexLegi0n
Copy link

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

a.butolin added 5 commits August 12, 2024 16:48
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();
Copy link
Owner

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);
Copy link
Owner

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);
Copy link
Owner

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);

@SlavaVedernikov SlavaVedernikov merged commit e547d6d into SlavaVedernikov:master Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants