Skip to content

Commit

Permalink
Added a custom ConsoleFormatter to give shorter lines (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell authored Mar 11, 2024
1 parent 1ca9ed0 commit e89efe7
Show file tree
Hide file tree
Showing 3 changed files with 481 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Tingle.AzureCleaner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ await cleaner.HandleAsync(prId: pullRequestId,

["Logging:LogLevel:Tingle.AzureCleaner"] = "Trace",

["Logging:Console:FormatterName"] = "Simple",
["Logging:Console:FormatterName"] = "Tingle",
["Logging:Console:FormatterOptions:SingleLine"] = "True",
["Logging:Console:FormatterOptions:IncludeCategory"] = "False",
["Logging:Console:FormatterOptions:IncludeEventId"] = "False",
Expand All @@ -73,6 +73,11 @@ await cleaner.HandleAsync(prId: pullRequestId,
});
});

host.ConfigureLogging((context, builder) =>
{
builder.AddConsoleFormatter<TingleConsoleFormatter, TingleConsoleOptions>();
});

host.ConfigureServices(services =>
{
services.AddCleaner(builder.Configuration.GetSection("Cleaner"));
Expand Down
2 changes: 1 addition & 1 deletion Tingle.AzureCleaner/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"profiles": {
"Tingle.AzureCleaner": {
"commandName": "Project",
//"commandLineArgs": "Tingle.AzureCleaner --pr 3 --subscription DEPENDABOT",
//"commandLineArgs": "Tingle.AzureCleaner --pr 3001 --subscription DEPENDABOT",
"launchBrowser": true,
"launchUrl": "health",
"environmentVariables": {
Expand Down
Loading

0 comments on commit e89efe7

Please sign in to comment.