diff --git a/util/Migrator/DbMigrator.cs b/util/Migrator/DbMigrator.cs
index b5592b3580..5581818cc2 100644
--- a/util/Migrator/DbMigrator.cs
+++ b/util/Migrator/DbMigrator.cs
@@ -2,6 +2,7 @@
using System.Data.SqlClient;
using System.Reflection;
using System.Threading;
+using Bit.Core;
using DbUp;
using Microsoft.Extensions.Logging;
@@ -28,7 +29,7 @@ namespace Bit.Migrator
{
if(enableLogging && _logger != null)
{
- _logger.LogInformation("Migrating database.");
+ _logger.LogInformation(Constants.BypassFiltersEventId, "Migrating database.");
}
using(var connection = new SqlConnection(_masterConnectionString))
@@ -83,11 +84,11 @@ namespace Bit.Migrator
{
if(result.Successful)
{
- _logger.LogInformation("Migration successful.");
+ _logger.LogInformation(Constants.BypassFiltersEventId, "Migration successful.");
}
else
{
- _logger.LogError(result.Error, "Migration failed.");
+ _logger.LogError(Constants.BypassFiltersEventId, result.Error, "Migration failed.");
}
}
diff --git a/util/Migrator/DbUpLogger.cs b/util/Migrator/DbUpLogger.cs
index 147145f0b5..1c1707d214 100644
--- a/util/Migrator/DbUpLogger.cs
+++ b/util/Migrator/DbUpLogger.cs
@@ -1,4 +1,5 @@
-using DbUp.Engine.Output;
+using Bit.Core;
+using DbUp.Engine.Output;
using Microsoft.Extensions.Logging;
namespace Bit.Migrator
@@ -14,17 +15,17 @@ namespace Bit.Migrator
public void WriteError(string format, params object[] args)
{
- _logger.LogError(format, args);
+ _logger.LogError(Constants.BypassFiltersEventId, format, args);
}
public void WriteInformation(string format, params object[] args)
{
- _logger.LogInformation(format, args);
+ _logger.LogInformation(Constants.BypassFiltersEventId, format, args);
}
public void WriteWarning(string format, params object[] args)
{
- _logger.LogWarning(format, args);
+ _logger.LogWarning(Constants.BypassFiltersEventId, format, args);
}
}
}
diff --git a/util/Migrator/Migrator.csproj b/util/Migrator/Migrator.csproj
index 7ff90711ab..a49ea63d30 100644
--- a/util/Migrator/Migrator.csproj
+++ b/util/Migrator/Migrator.csproj
@@ -14,4 +14,8 @@
+
+
+
+