structured logging

This commit is contained in:
Shaun Walker
2019-10-22 11:57:28 -04:00
parent ce25967633
commit 2e3a4efb74
79 changed files with 891 additions and 497 deletions

View File

@ -50,7 +50,8 @@
}
catch (Exception ex)
{
AddModuleMessage(ex.Message, MessageType.Error);
await logger.LogError(ex, "Error Loading Tenants {Error}", ex.Message);
AddModuleMessage("Error Loading Tenants", MessageType.Error);
}
}
@ -68,11 +69,13 @@
tenant.DBSchema = schema;
tenant.IsInitialized = false;
await TenantService.AddTenantAsync(tenant);
await logger.LogInformation("Tenant Created {Tenant}", tenant);
NavigationManager.NavigateTo(NavigateUrl());
}
else
{
await logger.LogError("Error Creating Tenant {Error}", response.Message);
AddModuleMessage(response.Message, MessageType.Error);
}
}