ESCLogger
Extends: Object
Description
Logging framework for Escoria
Constants Descriptions
LOG_DEBUG
const LOG_ERROR: int = 0
Valid log levels
LOG_ERROR
const LOG_ERROR: int = 0
Valid log levels
LOG_FILE_FORMAT
const LOG_FILE_FORMAT: String = "log_%s_%s.log"
Log file format
LOG_INFO
const LOG_ERROR: int = 0
Valid log levels
LOG_TRACE
const LOG_ERROR: int = 0
Valid log levels
LOG_WARNING
const LOG_ERROR: int = 0
Valid log levels
Property Descriptions
warning_path
var warning_path: String
The path of the ESC file that was reported last (used for removing duplicate warnings
log_file
var log_file: File
Log file handler
crash_savegame_filename
var crash_savegame_filename
Crash save filename
crashed
var crashed
Did we crash already?
Method Descriptions
trace
func trace(string: String, args)
Log a trace message
Global variables can be substituted into the text by wrapping the global name in braces. e.g. trace “There are {coin_count} coins remaining”.
Parameters
string: Text to log
args: Additional information
debug
func debug(string: String, args)
Log a debug message
Global variables can be substituted into the text by wrapping the global name in braces. e.g. debug “There are {coin_count} coins remaining”.
Parameters
string: Text to log
args: Additional information
info
func info(string: String, args)
Log an info message
Global variables can be substituted into the text by wrapping the global name in braces. e.g. info “There are {coin_count} coins remaining”.
Parameters
string: Text to log
args: Additional information
warning
func warning(string: String, args)
Log a warning message
Global variables can be substituted into the text by wrapping the global name in braces. e.g. warning “There are {coin_count} coins remaining”.
Parameters
string: Text to log
args: Additional information
error
func error(string: String, args, do_savegame: bool = true)
Log an error message
Global variables can be substituted into the text by wrapping the global name in braces. e.g. error “There are {coin_count} coins remaining”.
Parameters
string: Text to log
args: Additional information
report_warnings
func report_warnings(p_path: String, warnings: Array, report_once = false) -> void
Log a warning message about an ESC file
Parameters
p_path: Path to the file
warnings: Array of warnings to put out
report_once: Additional messages about the same file will be ignored
report_errors
func report_errors(p_path: String, errors: Array) -> void
Log an error message about an ESC file
Parameters
p_path: Path to the file
errors: Array of errors to put out
close_logs
func close_logs()
Close the log file cleanly