Show / Hide Table of Contents

Class Log

The logging class for World Modeler.

Inheritance
object
Log
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Logger
Assembly: WMServer.dll
Syntax
public class Log
Remarks

Log instances are static and stored in the private

Properties

Level

The level at which log messages will be written out for this Log instance.

Declaration
public int Level { get; set; }
Property Value
Type Description
int

MessageBuffer

provides a buffer for messages to prevent messages from being missed

Declaration
public List<string> MessageBuffer { get; }
Property Value
Type Description
List<string>

ShowSourceRef

Show the source file and line number from which the log entyry is being called.

Declaration
public bool ShowSourceRef { get; set; }
Property Value
Type Description
bool

ShowTime

Show the time of each log entry.

Declaration
public bool ShowTime { get; set; }
Property Value
Type Description
bool

Methods

Init(ConfigurationManager)

Initialize the logger.

Declaration
public static void Init(ConfigurationManager configMgr)
Parameters
Type Name Description
ConfigurationManager configMgr
Remarks

The logging configuration is read from the application's ConfigurationManager.

Throw(string, int, Exception?)

Declaration
public static void Throw(string message, int status = -1, Exception? innerException = null)
Parameters
Type Name Description
string message
int status
Exception innerException

Write(string, LogLevel, int, bool)

Declaration
public static void Write(string message, LogLevel level = LogLevel.Debug, int additionalStackLevels = 0, bool writeHeader = true)
Parameters
Type Name Description
string message

The message

LogLevel level

The loglevel for this message. Debug by default.

int additionalStackLevels

Adds the specified previous frames to the message. By default zero.

bool writeHeader

Writes the message header if true.

In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE