You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
854 B
35 lines
854 B
using System;
|
|
using FluentMigrator.Runner;
|
|
using Microsoft.Extensions.Logging;
|
|
using NLog;
|
|
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
|
|
|
namespace NzbDrone.Core.Datastore.Migration.Framework
|
|
{
|
|
public class MigrationLoggerProvider : ILoggerProvider
|
|
{
|
|
private readonly Logger _logger;
|
|
|
|
public MigrationLoggerProvider(Logger logger)
|
|
{
|
|
_logger = logger;
|
|
}
|
|
|
|
public ILogger CreateLogger(string categoryName)
|
|
{
|
|
return new MigrationLogger(_logger, new FluentMigratorLoggerOptions() { ShowElapsedTime = true, ShowSql = true });
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Dispose(true);
|
|
GC.SuppressFinalize(this);
|
|
}
|
|
|
|
protected virtual void Dispose(bool disposing)
|
|
{
|
|
// Nothing to clean up
|
|
}
|
|
}
|
|
}
|