Skip to content

FxLog ​

This module provides functions for logging custom messages to the system log. The system log can be found at Documents\Foxel\Log\system.log.

Load ​

lua
FxLog = require "FxLog";

Functions ​

FunctionDescription
WriteError (Message)Writes custom error messages to the log.
WriteTrace (Message)Writes custom trace messages to the log.
WriteWarning (Message)Writes custom warning messages to the log.

WriteError (Message) ​

This function writes a custom error message with the error code FX_CUSTOM_ERROR to the system log.

Parameters ​

  • Message: The error message to be written

Since ​

Version 1.0

Example ​

lua
FxLog.LogError("This is a message");

will write follwing line to the system log file using the current time stamp:

2024-08-17 10:31:10 ERROR   : FX_CUSTOM_ERROR 801: This is a message

WriteTrace (Message) ​

This function writes a custom trace message to the system log.

Parameters ​

  • Message: The trace message to be written

Since ​

Version 1.0

Example ​

lua
FxLog.LogTrace("This is a message");

will write follwing line to the system log file using the current time stamp:

2024-08-17 10:31:10 TRACE   : This is a message

WriteWarning (Message) ​

This function writes a custom warning message to the system log.

Parameters ​

  • Message: Warning message

Since ​

Version 1.0

Example ​

lua
FxLog.LogWarning("This is a message");

will write follwing line to the system log file using the current time stamp:

2024-08-17 10:31:10 WARNING : This is a message