IFullLogger.Warn(T) method¶
Defined in
Type: IFullLogger
Namespace: Splat
Assembly: Splat.Logging.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
Overloads¶
- 1.
void Warn<T>(T value) - 2.
void Warn<T>(IFormatProvider formatProvider, T value) - 3.
void Warn(Exception exception, string? message) - 4.
void Warn(IFormatProvider formatProvider, string message, params object[] args) - 5.
void Warn(string? message) - 6.
void Warn<T>(string? message) - 7.
void Warn(string message, params object[] args) - 8.
void Warn<T>(string message, params object[] args) - 9.
void Warn<TArgument>(IFormatProvider formatProvider, string message, TArgument argument) - 10.
void Warn<TArgument1, TArgument2>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2) - 11.
void Warn<TArgument1, TArgument2, TArgument3>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) - 12.
void Warn(Func<string> function) - 13.
void Warn<T>(Func<string> function) - 14.
void Warn(Exception exception, Func<string> function)
1. Overload¶
void Warn<T>(T value)
Summary: Emits a warning log message. This will emit the public contents of the object provided to the log.
Type parameters
| Name | Description |
|---|---|
T | The type of object used as the message. |
Parameters
| Name | Type | Description |
|---|---|---|
value | T | The log to emit. |
2. Overload¶
void Warn<T>(IFormatProvider formatProvider, T value)
Summary: Emits a warning log message. This will emit the public contents of the object provided to the log.
Type parameters
| Name | Description |
|---|---|
T | The type of object used as the message. |
Parameters
| Name | Type | Description |
|---|---|---|
formatProvider | IFormatProvider | The format provider to use. |
value | T | The value to emit. |
3. Overload¶
void Warn(Exception exception, string? message)
Summary: Emits a warning log message with exception. This will emit details about a exception. This type of logging is not able to be localized.
Parameters
| Name | Type | Description |
|---|---|---|
exception | Exception | The exception which to emit in the log. |
message | string? | A message to emit. |
4. Overload¶
void Warn(IFormatProvider formatProvider, string message, params object[] args)
Summary: Emits a message using formatting to the warning log.
Parameters
| Name | Type | Description |
|---|---|---|
formatProvider | IFormatProvider | The format provider to use. |
message | string | A message to emit to the log which includes the standard formatting tags. |
params args | object[] | The arguments for formatting purposes. |
5. Overload¶
void Warn(string? message)
Summary: Emits a message to the warning log.
Parameters
| Name | Type | Description |
|---|---|---|
message | string? | A non-localizable message to send to the log. |
6. Overload¶
void Warn<T>(string? message)
Summary: Emits a message to the warning log.
Type parameters
| Name | Description |
|---|---|
T | The calling type. |
Parameters
| Name | Type | Description |
|---|---|---|
message | string? | A non-localizable message to send to the log. |
7. Overload¶
void Warn(string message, params object[] args)
Summary: Emits a message using formatting to the warning log.
Parameters
| Name | Type | Description |
|---|---|---|
message | string | A non-localizable message to emit to the log which includes the standard formatting tags. |
params args | object[] | The arguments for formatting purposes. |
8. Overload¶
void Warn<T>(string message, params object[] args)
Summary: Emits a message using formatting to the warning log.
Type parameters
| Name | Description |
|---|---|
T | The calling type. |
Parameters
| Name | Type | Description |
|---|---|---|
message | string | A non-localizable message to emit to the log which includes the standard formatting tags. |
params args | object[] | The arguments for formatting purposes. |
9. Overload¶
void Warn<TArgument>(IFormatProvider formatProvider, string message, TArgument argument)
Summary: Emits a message using formatting to the warning log.
Type parameters
| Name | Description |
|---|---|
TArgument | The type of the argument which is used in the formatting. |
Parameters
| Name | Type | Description |
|---|---|---|
formatProvider | IFormatProvider | The format provider to use. |
message | string | A message to emit to the log which includes the standard formatting tags. |
argument | TArgument | The argument for formatting purposes. |
10. Overload¶
void Warn<TArgument1, TArgument2>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2)
Summary: Emits a message using formatting to the warning log.
Type parameters
| Name | Description |
|---|---|
TArgument1 | The type of the first argument which is used in the formatting. |
TArgument2 | The type of the second argument which is used in the formatting. |
Parameters
| Name | Type | Description |
|---|---|---|
formatProvider | IFormatProvider | The format provider to use. |
message | string | A message to emit to the log which includes the standard formatting tags. |
argument1 | TArgument1 | The first argument for formatting purposes. |
argument2 | TArgument2 | The second argument for formatting purposes. |
11. Overload¶
void Warn<TArgument1, TArgument2, TArgument3>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3)
Summary: Emits a message using formatting to the warning log.
Type parameters
| Name | Description |
|---|---|
TArgument1 | The type of the first argument which is used in the formatting. |
TArgument2 | The type of the second argument which is used in the formatting. |
TArgument3 | The type of the third argument which is used in the formatting. |
Parameters
| Name | Type | Description |
|---|---|---|
formatProvider | IFormatProvider | The format provider to use. |
message | string | A message to emit to the log which includes the standard formatting tags. |
argument1 | TArgument1 | The first argument for formatting purposes. |
argument2 | TArgument2 | The second argument for formatting purposes. |
argument3 | TArgument3 | The third argument for formatting purposes. |
12. Overload¶
void Warn(Func<string> function)
Summary: Sends the value provided by the provided delegate, only if Warn is enabled.
Parameters
| Name | Type | Description |
|---|---|---|
function | Func | The function to evaluate if Warn logging is enabled. |
13. Overload¶
void Warn<T>(Func<string> function)
Summary: Sends the value provided by the provided delegate, only if Warn is enabled.
Type parameters
| Name | Description |
|---|---|
T | The calling type. |
Parameters
| Name | Type | Description |
|---|---|---|
function | Func | The function to evaluate if Warn logging is enabled. |
14. Overload¶
void Warn(Exception exception, Func<string> function)
Summary: Sends the value provided by the provided delegate, only if Warn is enabled.
Parameters
| Name | Type | Description |
|---|---|---|
exception | Exception | A exception to log about. |
function | Func | The function to evaluate if Warn logging is enabled. |