Table of Contents

Class PrismLog

Namespace
Refractor
Assembly
Refractor.dll

prism's process wide logger. Usable before any Prism exists. Setting the PRISM_LOG environment variable to a level name makes prism log to standard error on its own, until a handler is added to MessageLogged.

public static class PrismLog
Inheritance
PrismLog
Inherited Members

Methods

Flush()

Waits until everything queued before the call has been delivered.

public static void Flush()

SetLevel(LogLevel)

Sets the lowest level delivered and returns the one before.

public static LogLevel SetLevel(LogLevel level)

Parameters

level LogLevel

Returns

LogLevel

Shutdown()

Flushes and stops the logger.

public static void Shutdown()

Write(LogLevel, string, string)

Queues a message through prism's logger, below the level it is dropped.

public static void Write(LogLevel level, string source, string message)

Parameters

level LogLevel
source string
message string

Events

MessageLogged

Raised for each message at or above the level, with a null sender. Handlers run on prism's logging thread, one message at a time, and should be quick. They must not add or remove handlers, or flush, from there. An exception one throws is dropped, and the others still run.

public static event EventHandler<LogMessageEventArgs>? MessageLogged

Event Type

EventHandler<LogMessageEventArgs>