Standardize logging

This commit is contained in:
Robert McRackan 2020-10-02 09:35:58 -04:00
parent a3ee3c2881
commit 59c3845d21
3 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@ namespace FileLiberator
private static async Task<StatusHandler> processBookAsync(IProcessable processable, LibraryBook libraryBook)
{
Serilog.Log.Information("Begin " + nameof(processBookAsync) + " {@DebugInfo}", new
Serilog.Log.Logger.Information("Begin " + nameof(processBookAsync) + " {@DebugInfo}", new
{
libraryBook.Book.Title,
libraryBook.Book.AudibleProductId,

View File

@ -10,7 +10,7 @@ namespace LibationWinForms.BookLiberation
{
public static async Task BackupSingleBookAsync(string productId, EventHandler<LibraryBook> completedAction = null)
{
Serilog.Log.Information("Begin " + nameof(BackupSingleBookAsync) + " {@DebugInfo}", new { productId });
Serilog.Log.Logger.Information("Begin " + nameof(BackupSingleBookAsync) + " {@DebugInfo}", new { productId });
var backupBook = getWiredUpBackupBook(completedAction);
@ -22,7 +22,7 @@ namespace LibationWinForms.BookLiberation
public static async Task BackupAllBooksAsync(EventHandler<LibraryBook> completedAction = null)
{
Serilog.Log.Information("Begin " + nameof(BackupAllBooksAsync));
Serilog.Log.Logger.Information("Begin " + nameof(BackupAllBooksAsync));
var backupBook = getWiredUpBackupBook(completedAction);
@ -100,7 +100,7 @@ namespace LibationWinForms.BookLiberation
public static async Task BackupAllPdfsAsync(EventHandler<LibraryBook> completedAction = null)
{
Serilog.Log.Information("Begin " + nameof(BackupAllPdfsAsync));
Serilog.Log.Logger.Information("Begin " + nameof(BackupAllPdfsAsync));
var downloadPdf = getWiredUpDownloadPdf(completedAction);

View File

@ -335,7 +335,7 @@ namespace LibationWinForms
}
catch (Exception ex)
{
Serilog.Log.Error(ex, "Error attempting to export library");
Serilog.Log.Logger.Error(ex, "Error attempting to export library");
MessageBox.Show("Error attempting to export your library. Error message:\r\n\r\n" + ex.Message, "Error exporting", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}