Skip to content

Commit

Permalink
Improve precision of some diagnostic messages
Browse files Browse the repository at this point in the history
Relates to #2447
  • Loading branch information
odinserj committed Sep 30, 2024
1 parent d986b4e commit d9d6748
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Hangfire.Core/Common/CancellationTokenExtentions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static bool Wait(this CancellationToken cancellationToken, TimeSpan timeo
try
{
var logger = LogProvider.GetLogger(typeof(CancellationTokenExtentions));
logger.Error($"Actual wait time for non-canceled token was '{stopwatch.Elapsed}' instead of '{timeout}', wait result: {waitResult}, using protective wait. Please report this to Hangfire developers.");
logger.Error($"Actual wait time for non-canceled token was '{stopwatch.Elapsed.TotalMilliseconds}' ms instead of '{timeout.TotalMilliseconds}' ms, wait result: {waitResult}, using protective wait. Please report this to Hangfire developers.");
}
finally
{
Expand Down
2 changes: 1 addition & 1 deletion src/Hangfire.Core/Processing/TaskExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static bool WaitOne([NotNull] this WaitHandle waitHandle, TimeSpan timeou
try
{
var logger = LogProvider.GetLogger(typeof(TaskExtensions));
logger.Error($"Actual wait time for non-canceled token was '{stopwatch.Elapsed}' instead of '{timeout}', wait result: {waitResult}, using protective wait. Please report this to Hangfire developers.");
logger.Error($"Actual wait time for non-canceled token was '{stopwatch.Elapsed.TotalMilliseconds}' ms instead of '{timeout.TotalMilliseconds}' ms, wait result: {waitResult}, using protective wait. Please report this to Hangfire developers.");
}
finally
{
Expand Down

0 comments on commit d9d6748

Please sign in to comment.