Class LoggingUtilities
Utility functions around logging
Inherited Members
Namespace: FluentMigrator.Runner
Assembly: FluentMigrator.Runner.Core.dll
Syntax
public static class LoggingUtilities
Methods
LogElapsedTime(ILogger, TimeSpan)
Log elapsed time
Declaration
public static void LogElapsedTime(this ILogger logger, TimeSpan timeSpan)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The logger |
TimeSpan | timeSpan | The elapsed time |
LogEmphasized(ILogger, string)
Log emphasized message
Declaration
public static void LogEmphasized(this ILogger logger, string message)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The logger |
string | message | The message |
LogHeader(ILogger, string)
Log header message
Declaration
public static void LogHeader(this ILogger logger, string message)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The logger |
string | message | The message |
LogSay(ILogger, string)
Log an informational message
Declaration
public static void LogSay(this ILogger logger, string message)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The logger |
string | message | The message |
LogSql(ILogger, string)
Log SQL code
Declaration
public static void LogSql(this ILogger logger, string sql)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The logger |
string | sql | The SQL code |
WriteException(TextWriter, Exception, int)
Writes the exception (and all its inner exceptions) to the given writer
Declaration
public static void WriteException(this TextWriter writer, Exception exception, int level = 0)
Parameters
Type | Name | Description |
---|---|---|
TextWriter | writer | The TextWriter to write the text to |
Exception | exception | The exception containing the message |
int | level | A value > 0 when this exception is an inner exception |
WriteExceptionMessage(TextWriter, string, int)
Writes the exception message to the given writer
Declaration
public static void WriteExceptionMessage(this TextWriter writer, string message, int level = 0)
Parameters
Type | Name | Description |
---|---|---|
TextWriter | writer | The TextWriter to write the text to |
string | message | The exception message |
int | level | A value > 0 when this exception is an inner exception |
WriteHeader(TextWriter)
Writes the header to the given writer
Declaration
public static void WriteHeader(this TextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
TextWriter | writer | The TextWriter to write the text to |
WriteHorizontalRuler(TextWriter)
Writes a horizontal ruler to the given writer
Declaration
public static void WriteHorizontalRuler(this TextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
TextWriter | writer | The TextWriter to write the text to |