Skip to content

)} )} )}

WrappingFullLogger.Warn(T) method

Defined in

Type: WrappingFullLogger 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. public void Warn<T>(T value)
  • 2. public void Warn<T>(IFormatProvider formatProvider, T value)
  • 3. public void Warn(Exception exception, string? message)
  • 4. public void Warn(IFormatProvider formatProvider, string message, params object[] args)
  • 5. public void Warn(string? message)
  • 6. public void Warn<T>(string? message)
  • 7. public void Warn(string message, params object[] args)
  • 8. public void Warn<T>(string message, params object[] args)
  • 9. public void Warn<TArgument>(IFormatProvider formatProvider, string message, TArgument argument)
  • 10. public void Warn<TArgument1, TArgument2>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2)
  • 11. public void Warn<TArgument1, TArgument2, TArgument3>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3)
  • 12. public void Warn(Func<string> function)
  • 13. public void Warn<T>(Func<string> function)
  • 14. public void Warn(Exception exception, Func<string> function)

1. Overload

public void Warn<T>(T value)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a warning log message. This will emit the public contents of the object provided to the log.

Type parameters

NameDescription
TThe type of object used as the message.

Parameters

NameTypeDescription
valueTThe log to emit.

2. Overload

public void Warn<T>(IFormatProvider formatProvider, T value)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a warning log message. This will emit the public contents of the object provided to the log.

Type parameters

NameDescription
TThe type of object used as the message.

Parameters

NameTypeDescription
formatProviderIFormatProviderThe format provider to use.
valueTThe value to emit.

3. Overload

public void Warn(Exception exception, string? message)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

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

NameTypeDescription
exceptionExceptionThe exception which to emit in the log.
messagestring?A message to emit.

4. Overload

public void Warn(IFormatProvider formatProvider, string message, params object[] args)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a message using formatting to the warning log.

Parameters

NameTypeDescription
formatProviderIFormatProviderThe format provider to use.
messagestringA message to emit to the log which includes the standard formatting tags.
params argsobject[]The arguments for formatting purposes.

5. Overload

public void Warn(string? message)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a message to the warning log.

Parameters

NameTypeDescription
messagestring?A non-localizable message to send to the log.

6. Overload

public void Warn<T>(string? message)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a message to the warning log.

Type parameters

NameDescription
TThe calling type.

Parameters

NameTypeDescription
messagestring?A non-localizable message to send to the log.

7. Overload

public void Warn(string message, params object[] args)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a message using formatting to the warning log.

Parameters

NameTypeDescription
messagestringA non-localizable message to emit to the log which includes the standard formatting tags.
params argsobject[]The arguments for formatting purposes.

8. Overload

public void Warn<T>(string message, params object[] args)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a message using formatting to the warning log.

Type parameters

NameDescription
TThe calling type.

Parameters

NameTypeDescription
messagestringA non-localizable message to emit to the log which includes the standard formatting tags.
params argsobject[]The arguments for formatting purposes.

9. Overload

public void Warn<TArgument>(IFormatProvider formatProvider, string message, TArgument argument)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a message using formatting to the warning log.

Type parameters

NameDescription
TArgumentThe type of the argument which is used in the formatting.

Parameters

NameTypeDescription
formatProviderIFormatProviderThe format provider to use.
messagestringA message to emit to the log which includes the standard formatting tags.
argumentTArgumentThe argument for formatting purposes.

10. Overload

public void Warn<TArgument1, TArgument2>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a message using formatting to the warning log.

Type parameters

NameDescription
TArgument1The type of the first argument which is used in the formatting.
TArgument2The type of the second argument which is used in the formatting.

Parameters

NameTypeDescription
formatProviderIFormatProviderThe format provider to use.
messagestringA message to emit to the log which includes the standard formatting tags.
argument1TArgument1The first argument for formatting purposes.
argument2TArgument2The second argument for formatting purposes.

11. Overload

public void Warn<TArgument1, TArgument2, TArgument3>(IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Emits a message using formatting to the warning log.

Type parameters

NameDescription
TArgument1The type of the first argument which is used in the formatting.
TArgument2The type of the second argument which is used in the formatting.
TArgument3The type of the third argument which is used in the formatting.

Parameters

NameTypeDescription
formatProviderIFormatProviderThe format provider to use.
messagestringA message to emit to the log which includes the standard formatting tags.
argument1TArgument1The first argument for formatting purposes.
argument2TArgument2The second argument for formatting purposes.
argument3TArgument3The third argument for formatting purposes.

12. Overload

public void Warn(Func<string> function)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Sends the value provided by the provided delegate, only if Warn is enabled.

Parameters

NameTypeDescription
functionFuncThe function to evaluate if Warn logging is enabled.

13. Overload

public void Warn<T>(Func<string> function)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Sends the value provided by the provided delegate, only if Warn is enabled.

Type parameters

NameDescription
TThe calling type.

Parameters

NameTypeDescription
functionFuncThe function to evaluate if Warn logging is enabled.

14. Overload

public void Warn(Exception exception, Func<string> function)

View source

Inherited documentation

These docs were inherited from IFullLogger. The member doesn't override them on this type.

Summary: Sends the value provided by the provided delegate, only if Warn is enabled.

Parameters

NameTypeDescription
exceptionExceptionA exception to log about.
functionFuncThe function to evaluate if Warn logging is enabled.