Skip to content

Commit

Permalink
Log parameters in PascalCase
Browse files Browse the repository at this point in the history
  • Loading branch information
axunonb committed May 29, 2024
1 parent a68a025 commit b783a14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TournamentManager/TournamentManager/TournamentCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public async Task SetTournamentCompleted(long tournamentId, CancellationToken ca
if (!await _appDb.MatchRepository.AllMatchesCompletedAsync(new TournamentEntity(tournamentId), cancellationToken))
{
var ex = new InvalidOperationException($@"Tournament {tournamentId} contains incomplete matches.");
_logger.LogCritical(@"Tournament {tournamentId} contains incomplete matches. {exception}", tournamentId, ex);
_logger.LogCritical(@"Tournament {TournamentId} contains incomplete matches. {Exception}", tournamentId, ex);
throw ex;
}

Expand All @@ -253,18 +253,18 @@ public async Task SetTournamentCompleted(long tournamentId, CancellationToken ca
if (!await da.SaveEntityAsync(tournament, true, true, cancellationToken))
{
var ex = new InvalidOperationException($"Tournament Id {tournamentId} could not be saved to persistent storage.");
_logger.LogCritical(@"Tournament Id {tournamentId} could not be saved to persistent storage. {exception}", tournamentId, ex);
_logger.LogCritical(@"Tournament Id {TournamentId} could not be saved to persistent storage. {Exception}", tournamentId, ex);
throw ex;
}
_logger.LogInformation("Tournament {tournament} set as completed.", tournament);
_logger.LogInformation("Tournament {Tournament} set as completed.", tournament);
}

public virtual async Task SetRoundCompleted(RoundEntity round, CancellationToken cancellationToken)
{
if (!await _appDb.MatchRepository.AllMatchesCompletedAsync(round, cancellationToken))
{
var ex = new InvalidOperationException($"Round {round.Id} has uncompleted matches.");
_logger.LogCritical(@"Round {roundId} has uncompleted matches. {exception}", round.Id, ex);
_logger.LogCritical(@"Round {RoundId} has uncompleted matches. {Exception}", round.Id, ex);
throw ex;
}

Expand Down

0 comments on commit b783a14

Please sign in to comment.