Class LoggerExtensions
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Logging helpers shared across the renderer.
public static class LoggerExtensionsInheritance
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, for warnings whose message also carries context that varies per occurrence - which event asked for it, which file hit it - without that context making it a warning you have not already seen. 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.

