LogWarning Method
LogWarning(Logger, EventId, Exception, string, params object?[])
Formats and writes a warning log message.
[Obsolete("Obsolete, use equivalent ILogger method, or view the changelog for further instruction.")]
public static void LogWarning(this Logger logger, EventId eventId, Exception exception, string message, params object?[] args)
Parameters
Type | Name | Description |
---|---|---|
Logger | logger | The Logger to write to. |
Event |
eventId | The event id associated with the log. |
Exception | exception | The exception to log. |
string | message | Format string of the log message in message template format.
Example: |
object[] | args | An object array that contains zero or more objects to format. |
Examples
logger.LogWarning(0, exception, "Error while processing request from {Address}", address)
LogWarning(Logger, EventId, string, params object?[])
Formats and writes a warning log message.
[Obsolete("Obsolete, use equivalent ILogger method, or view the changelog for further instruction.")]
public static void LogWarning(this Logger logger, EventId eventId, string message, params object?[] args)
Parameters
Type | Name | Description |
---|---|---|
Logger | logger | The Logger to write to. |
Event |
eventId | The event id associated with the log. |
string | message | Format string of the log message in message template format.
Example: |
object[] | args | An object array that contains zero or more objects to format. |
Examples
logger.LogWarning(0, "Processing request from {Address}", address)
LogWarning(Logger, Exception, string, params object?[])
Formats and writes a warning log message.
[Obsolete("Obsolete, use equivalent ILogger method, or view the changelog for further instruction.")]
public static void LogWarning(this Logger logger, Exception exception, string message, params object?[] args)
Parameters
Type | Name | Description |
---|---|---|
Logger | logger | The Logger to write to. |
Exception | exception | The exception to log. |
string | message | Format string of the log message in message template format.
Example: |
object[] | args | An object array that contains zero or more objects to format. |
Examples
logger.LogWarning(exception, "Error while processing request from {Address}", address)
LogWarning(Logger, string, params object?[])
Formats and writes a warning log message.
[Obsolete("Obsolete, use equivalent ILogger method, or view the changelog for further instruction.")]
public static void LogWarning(this Logger logger, string message, params object?[] args)
Parameters
Type | Name | Description |
---|---|---|
Logger | logger | The Logger to write to. |
string | message | Format string of the log message in message template format.
Example: |
object[] | args | An object array that contains zero or more objects to format. |
Examples
logger.LogWarning("Processing request from {Address}", address)