Class Logger
Singleton logger class
Inheritance
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
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)
IsLogEnabled()
Determines whether logging to file is enabled.
Declaration
public static bool IsLogEnabled()
Returns
bool
|
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
String 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
Log 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
Log 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
Log The message type. |
String The message text. |
WriteFloor()
Writes a series of '=' chars to the log to end a section.
Declaration
public static void WriteFloor()