Class FluentMigratorLogger
The base class for FluentMigrator-style
Namespace: FluentMigrator.Runner.Logging
Assembly: FluentMigrator.Runner.Core.dll
Syntax
public abstract class FluentMigratorLogger : ILogger
Constructors
| Improve this Doc View SourceFluentMigratorLogger(FluentMigratorLoggerOptions)
Initializes a new instance of the FluentMigratorLogger class.
Declaration
protected FluentMigratorLogger(FluentMigratorLoggerOptions options)
Parameters
Type | Name | Description |
---|---|---|
FluentMigratorLoggerOptions | options | The logger options |
Methods
| Improve this Doc View SourceBeginScope<TState>(TState)
Declaration
public IDisposable BeginScope<TState>(TState state)
Parameters
Type | Name | Description |
---|---|---|
TState | state |
Returns
Type | Description |
---|---|
IDisposable |
Type Parameters
Name | Description |
---|---|
TState |
IsEnabled(LogLevel)
Declaration
public bool IsEnabled(LogLevel logLevel)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel |
Returns
Type | Description |
---|---|
Boolean |
Log<TState>(LogLevel, EventId, TState, Exception, Func<TState, Exception, String>)
Declaration
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel | |
EventId | eventId | |
TState | state | |
Exception | exception | |
Func<TState, Exception, String> | formatter |
Type Parameters
Name | Description |
---|---|
TState |
WriteElapsedTime(TimeSpan)
Writes the elapsed time
Declaration
protected abstract void WriteElapsedTime(TimeSpan timeSpan)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeSpan | The elapsed time |
WriteEmphasize(String)
Writes an emphasized text
Declaration
protected abstract void WriteEmphasize(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message to write |
WriteEmptySql()
Called when an attempt was made to write an empty SQL statement
Declaration
protected abstract void WriteEmptySql()
WriteError(Exception)
Writes an exception message
Declaration
protected abstract void WriteError(Exception exception)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | The exception containing the message |
WriteError(String)
Writes an error message
Declaration
protected abstract void WriteError(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | The error message |
WriteHeading(String)
Writes a heading
Declaration
protected abstract void WriteHeading(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | The heading message |
WriteSay(String)
Writes a message
Declaration
protected abstract void WriteSay(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message |
WriteSql(String)
Writes an SQL statement
Declaration
protected abstract void WriteSql(string sql)
Parameters
Type | Name | Description |
---|---|---|
String | sql | The SQL statement |