Class LoggerExtensions
Namespace: ValveResourceFormat.Utils
Assembly: ValveResourceFormat.dll
Logging helpers for warnings raised from per-frame code.
public static class LoggerExtensionsInheritance
object ← LoggerExtensions
Methods
LogUniqueWarning(ILogger, string, params ReadOnlySpan<object?>)
Logs a warning the first time it occurs with these arguments, for warnings raised from per-frame code (an unsupported class, an unknown name) that would otherwise repeat forever.
public static void LogUniqueWarning(this ILogger logger, string message, params ReadOnlySpan<object?> args)Parameters
logger ILogger
Logger to warn through.
message string
Message template, e.g. "Unknown sound event {SoundEventName}".
args ReadOnlySpan<object?>
Values for the template, which together with it identify the warning.
LogUniqueWarningFor(ILogger, ReadOnlySpan<object?>, string, params ReadOnlySpan<object?>)
Logs a warning the first time it occurs for identity, ignoring varying context in the message such as which event or file hit it. The full message is formatted either way; only identity decides whether it is logged.
public static void LogUniqueWarningFor(this ILogger logger, ReadOnlySpan<object?> identity, string message, params ReadOnlySpan<object?> args)Parameters
logger ILogger
Logger to warn through.
identity ReadOnlySpan<object?>
The values that, together with message, identify the warning.
message string
Message template, e.g. "Unsupported type {Type} for {Name}".
args ReadOnlySpan<object?>
Values for the template. Any not in identity are context only.

