Search Results for

    Show / Hide Table of Contents

    Class Logger

    Singleton logger class

    Inheritance
    Singleton
    Logger
    Inherited Members
    Singleton::Instance()
    Singleton::Singleton()
    Singleton::~Singleton()
    Namespace: Log
    Assembly: FlaxEngine.dll
    File: Engine/Core/Log.h
    Syntax
    public class Logger : public Singleton

    Fields

    LogFilePath

    Current log file path. Empty if not used.

    Declaration
    public static String LogFilePath
    Field Value
    String

    OnError

    Action fired on new log error message.

    Declaration
    public static Delegate<LogType, StringView> OnError
    Field Value
    Delegate<LogType, StringView>

    OnMessage

    Action fired on new log message.

    Declaration
    public static Delegate<LogType, StringView> OnMessage
    Field Value
    Delegate<LogType, StringView>

    Methods

    Dispose()

    Disposes a logging service.

    Declaration
    public static void Dispose()

    Flush()

    Flushes log file with a memory buffer.

    Declaration
    public static void Flush()

    Init()

    Initializes a logging service.

    Declaration
    public static bool Init()
    Returns
    bool

    True if cannot init logging service, otherwise false.

    IsError(const LogType type)

    Declaration
    public static bool IsError(const LogType type)
    Parameters
    LogType type

    Returns
    bool

    IsLogEnabled()

    Determines whether logging to file is enabled.

    Declaration
    public static bool IsLogEnabled()
    Returns
    bool

    true if log is enabled; otherwise, false.

    Write(const Char* msg)

    Writes a custom message to the log.

    Declaration
    public static void Write(const Char* msg)
    Parameters
    Char msg

    The message text.

    Returns
    void

    Write(const Exception& exception)

    Writes an exception formatted message to log file.

    Declaration
    public static void Write(const Exception& exception)
    Parameters
    Exception exception

    The exception to write to the file.

    Write(const String& msg)

    Writes a custom message to the log.

    Declaration
    public static void Write(const String& msg)
    Parameters
    String msg

    The message text.

    Returns
    void

    Write(const StringView& msg)

    Writes a custom message to the log.

    Declaration
    public static void Write(const StringView& msg)
    Parameters
    StringView msg

    The message text.

    Write(LogType type, const Char* format, const Args& ... args)

    Writes a formatted message to the log file.

    Declaration
    public static void Write(LogType type, const Char* format, const Args& ... args)
    Parameters
    LogType type

    The message type.

    Char format

    The message format string.

    Args... args

    The format arguments.

    Returns
    void

    Type Parameters
    Args

    Write(LogType type, const Char* msg)

    Writes a message to the log file.

    Declaration
    public static void Write(LogType type, const Char* msg)
    Parameters
    LogType type

    The message type.

    Char msg

    The message text.

    Returns
    void

    Type Parameters
    Args

    Write(LogType type, const StringView& msg)

    Write a message to the log.

    Declaration
    public static void Write(LogType type, const StringView& msg)
    Parameters
    LogType type

    The message type.

    StringView msg

    The message text.

    WriteFloor()

    Writes a series of '=' chars to the log to end a section.

    Declaration
    public static void WriteFloor()

    See Also

    Singleton
    • Improve this Doc
    • View Source
    In This Article
    • Fields
      • LogFilePath
      • OnError
      • OnMessage
    • Methods
      • Dispose()
      • Flush()
      • Init()
      • IsError(const LogType type)
      • IsLogEnabled()
      • Write(const Char* msg)
      • Write(const Exception& exception)
      • Write(const String& msg)
      • Write(const StringView& msg)
      • Write(LogType type, const Char* format, const Args& ... args)
      • Write(LogType type, const Char* msg)
      • Write(LogType type, const StringView& msg)
      • WriteFloor()
    • See Also
    Back to top Copyright © 2012-2024 Wojciech Figat