Skip to content

Commit

Permalink
Add better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Sella-GH committed Jun 10, 2024
1 parent d4224b9 commit 72fa24c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions AzzyBot-Next/Logging/LoggerActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public static partial class LoggerActions
[LoggerMessage(12, LogLevel.Debug, "BackgroundServiceHost running")]
public static partial void BackgroundServiceHostRun(this ILogger<AzzyBackgroundServiceHost> logger);

[LoggerMessage(13, LogLevel.Debug, "Creating work items...")]
public static partial void BackgroundServiceWorkItem(this ILogger logger);
[LoggerMessage(13, LogLevel.Debug, "Creating work items for: {item}")]
public static partial void BackgroundServiceWorkItem(this ILogger logger, string item);

[LoggerMessage(90, LogLevel.Debug, "Stopping global timer")]
public static partial void GlobalTimerStop(this ILogger<TimerServiceHost> logger);
Expand Down
2 changes: 1 addition & 1 deletion AzzyBot-Next/Services/Modules/AzuraCastFileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async ValueTask QueueFileChangesChecksAsync()

private async ValueTask CheckForFileChangesAsync(AzuraCastStationEntity station, CancellationToken cancellationToken)
{
_logger.BackgroundServiceWorkItem();
_logger.BackgroundServiceWorkItem(nameof(CheckForFileChangesAsync));

cancellationToken.ThrowIfCancellationRequested();

Expand Down
2 changes: 1 addition & 1 deletion AzzyBot-Next/Services/Modules/AzuraCastUpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async ValueTask QueueAzuraCastUpdatesAsync()

private async ValueTask CheckForAzuraCastUpdatesAsync(AzuraCastEntity azuraCast, CancellationToken cancellationToken)
{
_logger.BackgroundServiceWorkItem();
_logger.BackgroundServiceWorkItem(nameof(CheckForAzuraCastUpdatesAsync));

cancellationToken.ThrowIfCancellationRequested();

Expand Down

0 comments on commit 72fa24c

Please sign in to comment.