Skip to main content

ConsoleLogEvents

A static class in Root.Township, Alta.Console.

Publishes server log lines as console events (TraceLog to FatalLog) so websocket console clients can subscribe to them.

Fields​

2 private and internal fields
MemberWhat it is
private static ConsoleEvent<ConsoleLogEvents.LogEvent>[] LogEventsOne console event per log level, indexed by NLog level ordinal.
private static Logger loggerNLog logger for this class.

Methods​

MemberWhat it is
static void Initialize()Hooks HandleLog onto ServerConsoleLogTarget.LogSentRaw. Called from ConsoleEventProcessor's static constructor.
1 private and internal method
MemberWhat it is
private static void HandleLog(LogEventInfo logInfo)Raises the console event for the log line's level with its message, time and logger name.