GlobalContext ClassApache log4net™ SDK Documentation
The log4net Global Context.
Inheritance Hierarchy

OnlineSystem Object
  log4net GlobalContext

Namespace: log4net
Assembly: log4net (in log4net.dll) Version: 1.2.15.0 (1.2.15.0)
Syntax

public sealed class GlobalContext
Remarks

The GlobalContext provides a location for global debugging information to be stored.

The global context has a properties map and these properties can be included in the output of log messages. The PatternLayout supports selecting and outputing these properties.

By default the log4net:HostName property is set to the name of the current machine.

Examples

GlobalContext.Properties["hostname"] = Environment.MachineName;
Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
See Also