Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    LogMessage Class

    Namespace: Stride.Core.Diagnostics
    Assembly: Stride.Core.dll

    A base log message used by the logging infrastructure.

    System.Object → LogMessage
    Derived from LogMessage: AssetLogMessage ProfilingMessage

    public class LogMessage : ILogMessage
    Remarks

    This class can be derived in order to provide additional custom log information.

    Name Description
    Constructors
    LogMessage()

    Initializes a new instance of the LogMessage class.

    LogMessage(String, LogMessageType, String)

    Initializes a new instance of the LogMessage class.

    LogMessage(String, LogMessageType, String, Exception, CallerInfo)

    Initializes a new instance of the LogMessage class.

    Properties
    CallerInfo

    Gets or sets the caller information.

    Exception

    Gets or sets the exception.

    ExceptionInfo

    Gets or sets the exception info.

    Module

    Gets or sets the module.

    Text

    Gets or sets the text.

    Type

    Gets or sets the type of this message.

    Methods
    ToString()

    Returns a System.String that represents this instance.

    | Improve this Doc View Source

    Constructors


    LogMessage()

    Initializes a new instance of the LogMessage class.

    public LogMessage()

    LogMessage(String, LogMessageType, String)

    Initializes a new instance of the LogMessage class.

    public LogMessage(string module, LogMessageType type, string text)
    Parameters
    Type Name Description
    System.String module

    The module.

    LogMessageType type

    The type.

    System.String text

    The text.


    LogMessage(String, LogMessageType, String, Exception, CallerInfo)

    Initializes a new instance of the LogMessage class.

    public LogMessage(string module, LogMessageType type, string text, Exception exception, CallerInfo callerInfo)
    Parameters
    Type Name Description
    System.String module

    The module.

    LogMessageType type

    The type.

    System.String text

    The text.

    System.Exception exception

    The exception.

    CallerInfo callerInfo

    The caller info.

    | Improve this Doc View Source

    Properties


    CallerInfo

    Gets or sets the caller information.

    public CallerInfo CallerInfo { get; set; }
    Property Value
    Type Description
    CallerInfo

    The caller information.


    Exception

    Gets or sets the exception.

    public Exception Exception { get; set; }
    Property Value
    Type Description
    System.Exception

    The exception.


    ExceptionInfo

    Gets or sets the exception info.

    public ExceptionInfo ExceptionInfo { get; }
    Property Value
    Type Description
    ExceptionInfo

    Module

    Gets or sets the module.

    public string Module { get; set; }
    Property Value
    Type Description
    System.String

    The module.

    Remarks

    The module is an identifier for a logical part of the system. It can be a class name, a namespace or a regular string not linked to a code hierarchy.


    Text

    Gets or sets the text.

    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    The text.


    Type

    Gets or sets the type of this message.

    public LogMessageType Type { get; set; }
    Property Value
    Type Description
    LogMessageType

    The type.

    | Improve this Doc View Source

    Methods


    ToString()

    Returns a System.String that represents this instance.

    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents this instance.

    Overrides
    System.Object.ToString()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    LogMessageExtensions.IsDebug(ILogMessage)
    LogMessageExtensions.IsVerbose(ILogMessage)
    LogMessageExtensions.IsInfo(ILogMessage)
    LogMessageExtensions.IsWarning(ILogMessage)
    LogMessageExtensions.IsError(ILogMessage)
    LogMessageExtensions.IsFatal(ILogMessage)
    LogMessageExtensions.IsAtLeast(ILogMessage, LogMessageType)
    LogMessageExtensions.IsAtMost(ILogMessage, LogMessageType)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation