public static void Migrate(SchemaUpdate schemaUpdate, IMigrationLogger migrationLogger, bool update_database = false) { schemaUpdate.Execute(migrationLogger.Log(), update_database); }
/// <summary> /// Logs the given log entry with debug level /// </summary> /// <param name="logger">The logger instance</param> /// <param name="exception">An optional exception</param> /// <param name="messageFormat">The message format</param> /// <param name="args">An optional collection of message format arguments</param> public static void LogDebug(this IMigrationLogger logger, Exception exception, string messageFormat, params string[] args) => logger.Log(MigrationLogLevel.Debug, exception, messageFormat, args);
/// <summary> /// Logs the given log entry with information level /// </summary> /// <param name="logger">The logger instance</param> /// <param name="exception">An optional exception</param> /// <param name="messageFormat">The message format</param> public static void LogInformation(this IMigrationLogger logger, Exception exception, string messageFormat) => logger.Log(MigrationLogLevel.Information, exception, messageFormat, EmptyArgs);
/// <summary> /// Logs the given log entry /// </summary> /// <param name="logger">The logger instance</param> /// <param name="level">The log level</param> /// <param name="exception">An optional exception</param> /// <param name="messageFormat">The message format</param> public static void Log(this IMigrationLogger logger, MigrationLogLevel level, Exception exception, string messageFormat) => logger.Log(level, exception, messageFormat);