Update more logging messages to use templates as opposed to string formats that were using the LoggerExtensions <T>

This commit is contained in:
Warren
2018-08-16 12:00:12 +01:00
parent d632b46f9a
commit 47c8651609
24 changed files with 88 additions and 60 deletions

View File

@@ -73,11 +73,11 @@ namespace Umbraco.Core.IO
}
catch (UnauthorizedAccessException ex)
{
Current.Logger.Error<PhysicalFileSystem>("Not authorized to get directories", ex);
Current.Logger.Error<PhysicalFileSystem>("Not authorized to get directories for '{Path}'", ex, fullPath);
}
catch (DirectoryNotFoundException ex)
{
Current.Logger.Error<PhysicalFileSystem>("Directory not found", ex);
Current.Logger.Error<PhysicalFileSystem>("Directory not found for '{Path}'", ex, fullPath);
}
return Enumerable.Empty<string>();
@@ -109,7 +109,7 @@ namespace Umbraco.Core.IO
}
catch (DirectoryNotFoundException ex)
{
Current.Logger.Error<PhysicalFileSystem>("Directory not found", ex);
Current.Logger.Error<PhysicalFileSystem>("Directory not found for '{Path}'", ex, fullPath);
}
}
@@ -189,11 +189,11 @@ namespace Umbraco.Core.IO
}
catch (UnauthorizedAccessException ex)
{
Current.Logger.Error<PhysicalFileSystem>("Not authorized to get directories", ex);
Current.Logger.Error<PhysicalFileSystem>("Not authorized to get directories for '{Path}'", ex, fullPath);
}
catch (DirectoryNotFoundException ex)
{
Current.Logger.Error<PhysicalFileSystem>("Directory not found", ex);
Current.Logger.Error<PhysicalFileSystem>("Directory not found for '{FullPath}'", ex, fullPath);
}
return Enumerable.Empty<string>();