LUA API v2 LOGGER - xAranaktu/FC-24-Live-Editor GitHub Wiki

LOGGER

Your logger. Writes text to Live Editor console and to the log file (that you can find in logs folder in the same directory where Live Editor is).

logger.lua

Fields

This class doesn't have any fields.

Methods

LogDebug

Logs debug text

Visible only in Log Level is set to DEBUG

Declaration

void LOGGER:LogDebug(string text)

Parameters

Type Name Description
string text Text that should be logged

Returns

Doesn't return anything

Example

LOGGER:LogDebug("Hello")
[09:31:28.608] [15948] [DEBUG] [LUA] Hello

LogInfo

Logs info text

Visible only in Log Level is set to INFO or lower

Declaration

void LOGGER:LogInfo(string text)

Parameters

Type Name Description
string text Text that should be logged

Returns

Doesn't return anything

Example

LOGGER:LogInfo("Hello")
[09:31:28.608] [15948] [INFO] [LUA] Hello

LogWarn

Logs warn text

Visible only in Log Level is set to WARN or lower

Declaration

void LOGGER:LogWarn(string text)

Parameters

Type Name Description
string text Text that should be logged

Returns

Doesn't return anything

Example

LOGGER:LogWarn("Hello")
[09:31:28.608] [15948] [WARN] [LUA] Hello

LogError

Logs error text

Visible only in Log Level is set to ERROR or lower

Declaration

void LOGGER:LogError(string text)

Parameters

Type Name Description
string text Text that should be logged

Returns

Doesn't return anything

Example

LOGGER:LogError("Hello")
[09:31:28.608] [15948] [ERROR] [LUA] Hello

LogFatal

Logs fatal text

Visible only in Log Level is set to FATAL or lower

Declaration

void LOGGER:LogFatal(string text)

Parameters

Type Name Description
string text Text that should be logged

Returns

Doesn't return anything

Example

LOGGER:LogFatal("Hello")
[09:31:28.608] [15948] [FATAL] [LUA] Hello