fix: Fixes structured logging (#1043)
- [X] Fixes various bugs in logging.
This commit is contained in:
parent
78bb4f4bb2
commit
6e69d25e33
31 changed files with 96 additions and 102 deletions
|
|
@ -90,7 +90,7 @@ namespace Server
|
|||
}
|
||||
else
|
||||
{
|
||||
logger.Warning($"map{mapFileIndex}.mul was not found.");
|
||||
logger.Warning("{File} was not found.", $"map{mapFileIndex}.mul");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ namespace Server
|
|||
}
|
||||
else
|
||||
{
|
||||
logger.Warning($"staidx{mapFileIndex}.mul was not found.");
|
||||
logger.Warning("{File} was not found.", $"staidx{mapFileIndex}.mul");
|
||||
}
|
||||
|
||||
var staticsPath = Core.FindDataFile($"statics{mapFileIndex}.mul", false);
|
||||
|
|
@ -114,7 +114,7 @@ namespace Server
|
|||
}
|
||||
else
|
||||
{
|
||||
logger.Warning($"statics{fileIndex}.mul was not found.");
|
||||
logger.Warning("{File} was not found.", $"statics{fileIndex}.mul");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ namespace Server
|
|||
|
||||
if (exception == null)
|
||||
{
|
||||
logger.Information("Maps loaded ({0:F2} seconds)", stopwatch.Elapsed.TotalSeconds);
|
||||
logger.Information("Maps loaded ({Duration:F2} seconds)", stopwatch.Elapsed.TotalSeconds);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Error(exception, "Loading maps failed ({0:F2} seconds)", stopwatch.Elapsed.TotalSeconds);
|
||||
logger.Error(exception, "Loading maps failed ({Duration:F2} seconds)", stopwatch.Elapsed.TotalSeconds);
|
||||
throw exception;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue