1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-30 13:33:24 +01:00
bitwarden-server/util/Migrator/DbUpLogger.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
727 B
C#
Raw Normal View History

2019-03-25 20:20:54 +01:00
using Bit.Core;
using DbUp.Engine.Output;
2019-03-25 18:21:05 +01:00
using Microsoft.Extensions.Logging;
namespace Bit.Migrator;
2022-08-29 22:06:55 +02:00
2019-03-25 18:21:05 +01:00
public class DbUpLogger : IUpgradeLog
{
private readonly ILogger _logger;
public DbUpLogger(ILogger logger)
{
2019-03-25 20:20:54 +01:00
_logger = logger;
2019-03-25 18:21:05 +01:00
}
public void WriteError(string format, params object[] args)
{
2019-03-25 20:20:54 +01:00
_logger.LogError(Constants.BypassFiltersEventId, format, args);
2019-03-25 18:21:05 +01:00
}
public void WriteInformation(string format, params object[] args)
{
2019-03-25 20:20:54 +01:00
_logger.LogInformation(Constants.BypassFiltersEventId, format, args);
}
2019-03-25 18:21:05 +01:00
public void WriteWarning(string format, params object[] args)
{
2019-03-25 20:20:54 +01:00
_logger.LogWarning(Constants.BypassFiltersEventId, format, args);
2019-03-25 18:21:05 +01:00
}
}