Show / Hide Table of Contents

Class Environment.Log

Methods for logging runtime messages and errors

Inheritance
System.Object
Environment.Log
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Experior.Core
Assembly: Experior.Core.dll
Syntax
public class Log

Methods

Action<T>(T)

Writes a specific Action filter type message to the active log view and logfile if enabled. The message is color-defined by the type of message.

Declaration
public static void Action<T>(T message)
Parameters
Type Name Description
T message
Type Parameters
Name Description
T

ClearLogView()

Clears the log view.

Declaration
public static void ClearLogView()

Communication<T>(T)

Writes a specific Communication filter type message to the active log view and logfile if enabled. The message is color-defined by the type of message.

Declaration
public static void Communication<T>(T message)
Parameters
Type Name Description
T message
Type Parameters
Name Description
T

DebugMessage<T>(T)

Writes a specific Debug filter type message to the active log view and logfile if enabled. The message is color-defined by the type of message.

Declaration
public static void DebugMessage<T>(T message)
Parameters
Type Name Description
T message
Type Parameters
Name Description
T

Error<T>(T)

Writes a specific Error filter type message to the active log view and logfile if enabled. The message is color-defined by the type of message.

Declaration
public static void Error<T>(T message)
Parameters
Type Name Description
T message
Type Parameters
Name Description
T

Exception<T>(T)

Writes a error categorized exception message to the active log view as well as the debug log file. The message is colored using the applicable color-map.

Declaration
public static void Exception<T>(T exception)
    where T : Exception
Parameters
Type Name Description
T exception

Exception to log

Type Parameters
Name Description
T

Exception<T>(T, Object)

Writes a error categorized exception message to the active log view as well as the debug log file. The message is colored using the applicable color-map.

Declaration
public static void Exception<T>(T exception, object context)
    where T : Exception
Parameters
Type Name Description
T exception

Exception to log

System.Object context
Type Parameters
Name Description
T

Information<T>(T)

Writes a specific Information filter type message to the active log view and logfile if enabled. The message is color-defined by the type of message.

Declaration
public static void Information<T>(T message)
Parameters
Type Name Description
T message
Type Parameters
Name Description
T

Subscribe(ILogTarget)

Subscribe to receive logs.

Declaration
public static void Subscribe(ILogTarget logTarget)
Parameters
Type Name Description
ILogTarget logTarget
Exceptions
Type Condition
System.ArgumentNullException
System.ArgumentException
System.Exception

System<T>(T)

Writes a specific System filter type message to the active log view and logfile if enabled. The message is color-defined by the type of message.

Declaration
public static void System<T>(T message)
Parameters
Type Name Description
T message
Type Parameters
Name Description
T

Unsubscribe(ILogTarget)

Unsubscribe from receiving logs.

Declaration
public static void Unsubscribe(ILogTarget logTarget)
Parameters
Type Name Description
ILogTarget logTarget
Exceptions
Type Condition
System.ArgumentNullException

Warning<T>(T)

Writes a specific Warning filter type message to the active log view and logfile if enabled. The message is color-defined by the type of message.

Declaration
public static void Warning<T>(T message)
Parameters
Type Name Description
T message
Type Parameters
Name Description
T

Write(Exception)

Writes a error categorized exception message to the active log view as well as the debug log file. The message is colored using the applicable color-map.

Declaration
public static void Write(Exception exception)
Parameters
Type Name Description
System.Exception exception

Exception to log

Write(Exception, Int32)

Writes a error categorized exception message to the active log view as well as the debug log file. The message is colored using the applicable color-map.

Declaration
public static void Write(Exception exception, int id)
Parameters
Type Name Description
System.Exception exception

Exception to log

System.Int32 id

Call site ID

Write(String)

Writes a non-categorized message to the active log view and logfile if enabled.

Declaration
public static void Write(string message)
Parameters
Type Name Description
System.String message

Message to log

Write(String, LogFilter)

Writes a categorized message to the active log view under the specified category and logfile if enabled. The message is colored using the applicable color-map for the filter/category.

Declaration
public static void Write(string message, LogFilter filter)
Parameters
Type Name Description
System.String message

Message to log

LogFilter filter

Log-message category

Write(String, Color)

Writes a non-categorized message to the active log view with specified color and logfile if enabled.

Declaration
[Obsolete("Please use categorized version - Action(), Debug() etc.", false)]
public static void Write(string message, Color color)
Parameters
Type Name Description
System.String message

Message to log

System.Windows.Media.Color color

Show in color (Black (255,0,0,0) will result in Theme color)

Write(String, Color, LogFilter)

Writes a categorized message to the active log view under the specified category and logfile if enabled. The message is colored using the specified color.

Declaration
public static void Write(string message, Color color, LogFilter filter)
Parameters
Type Name Description
System.String message

Message to log

System.Windows.Media.Color color

Show in color

LogFilter filter

Log message category

Back to top Generated by DocFX