Extends: Node
const DEBUG: logger.gd.LogLevel = 1
const ERROR: logger.gd.LogLevel = 4
const ERROR_MESSAGES: Dictionary = {"0":"OK.","1":"Generic error.","2":"Unavailable error.","3":"Unconfigured error.","4":"Unauthorized error.","5":"Parameter range error.","6":"Out of memory (OOM) error.","7":"File: Not found error.","8":"File: Bad drive error.","9":"File: Bad path error.","10":"File: No permission error.","11":"File: Already in use error.","12":"File: Can't open error.","13":"File: Can't write error.","14":"File: Can't read error.","15":"File: Unrecognized error.","16":"File: Corrupt error.","17":"File: Missing dependencies error.","18":"File: End of file (EOF) error.","19":"Can't open error.","20":"Can't create error.","21":"Query failed error.","22":"Already in use error.","23":"Locked error.","24":"Timeout error.","25":"Can't connect error.","26":"Can't resolve error.","27":"Connection error.","28":"Can't acquire resource error.","29":"Can't fork process error.","30":"Invalid data error.","31":"Invalid parameter error.","32":"Already exists error.","33":"Does not exist error.","34":"Database: Read error.","35":"Database: Write error.","36":"Compilation failed error.","37":"Method not found error.","38":"Linking failed error.","39":"Script failed error.","40":"Cycling link (import cycle) error.","41":"Invalid declaration error.","42":"Duplicate symbol error.","43":"Parse error.","44":"Busy error.","45":"Skip error.","46":"Help error.","47":"Bug error.","48":"Printer on fire error."}
const INFO: logger.gd.LogLevel = 2
const LEVEL_NAMES: Array = ["TRACE","DEBUG","INFO","WARNING","ERROR"]
const LEVEL_NAMES_SHORT: Array = ["TRC","DBG","INF","WRN","ERR"]
enum LogLevel{TRACE = 0, DEBUG = 1, INFO = 2, WARNING = 3, ERROR = 4, MAX = 5}
const TRACE: logger.gd.LogLevel = 0
const WARNING: logger.gd.LogLevel = 3
func trace(p_message: String, p_stack_depth: int = 1, p_stack_hint: int = 2) -> void
func debug(p_message: String) -> void
func info(p_message: String) -> void
func warning(p_message: String) -> void
func error(p_message: String) -> void
func set_level(p_level: logger.gd.LogLevel) -> void
func get_level() -> logger.gd.LogLevel
func set_log_record_formatter(p_log_record_formatter: LogRecordFormatter) -> void
func add_sink(p_sink: LogSink) -> void
func remove_sink(p_sink: LogSink) -> void
func flush_buffer() -> void
func format_log_level_name(p_level: logger.gd.LogLevel) -> String
Returns the full name of a log level.
func format_log_level_name_short(p_level: logger.gd.LogLevel) -> String
Returns a three letter abbreviation of a log level.
func format_month_short(p_month: int) -> String
Returns a three letter abbreviation of a month.
func format_session_id(p_session_id: int) -> String
Formats the session id number to a string truncated to 4 digits.
func format_time_default(p_unix_time: float) -> String
Formats a unix timestamp to a string. The default formatter uses this format.
func format_time_default_for_filename(p_unix_time: float) -> String
Formats a unix timestamp to a string. The DirSink uses this format.
func pad_string(p_string: String, p_length: int, p_pad_char: String = " ") -> String
Left pads a string with a character to a given length.
func format_error(p_error: int) -> String
func write_bulks(p_log_records: Array[Dictionary], p_formatted_messages: PackedStringArray) -> void
Write many log records to the sink
func flush_buffer() -> void
Flushes the buffer of the sink if it has one.
func close() -> void
Cleans up resources used by the sink.
func _init(p_sink: LogSink, p_level: logger.gd.LogLevel) -> FilteringPipe
func write_bulks(p_log_records: Array[Dictionary], p_formatted_messages: PackedStringArray) -> void
func flush_buffer() -> void
func close() -> void
func add_sink(p_sink: LogSink) -> void
func remove_sink(p_sink: LogSink) -> void
func write_bulks(p_log_records: Array[Dictionary], p_formatted_messages: PackedStringArray) -> void
func flush_buffer() -> void
func close() -> void
func _init(p_sink: LogSink, p_buffer_size: int = 42) -> BufferedPipe
Creates a new BufferedPipe.
The buffer size is the number of messages that will be buffered before being flushed to the sink.
func flush_buffer() -> void
func set_buffer_flush_interval_msec(p_buffer_flush_interval_msec: int) -> void
Set to 0 to disable interval flushing.
func write_bulks(p_log_records: Array[Dictionary], p_formatted_messages: PackedStringArray) -> void
func close() -> void
func write_bulks(p_log_records: Array[Dictionary], p_formatted_messages: PackedStringArray) -> void
func flush_buffer() -> void
func _init(p_log_name: String, p_dir_path: String, p_max_file_size: int = 4042, p_max_file_count: int = 10) -> DirSink
func flush_buffer() -> void
func write_bulks(p_log_records: Array[Dictionary], p_formatted_messages: PackedStringArray) -> void
func close() -> void
func _init(p_max_lines: int = 100) -> MemoryWindowSink
func write_bulks(p_log_records: Array[Dictionary], p_formatted_messages: PackedStringArray) -> void
func flush_buffer() -> void
func get_buffer() -> Dictionary
func _init(p_sink: LogSink, p_log_record_formatter: LogRecordFormatter) -> FormattingPipe
func write_bulks(p_log_records: Array[Dictionary], p_formatted_messages: PackedStringArray) -> void
func flush_buffer() -> void
func close() -> void
class LogRecordFormatter
func _init(p_tag: String, p_level: logger.gd.LogLevel = 0, p_log_record_formatter: LogRecordFormatter = null, p_sink: LogSink = null) -> Logger
func write_bulks(p_log_records: Array[Dictionary], p_formatted_messages: PackedStringArray) -> void
Write will not format the message, it will just pass it to the underlying sink.
func flush_buffer() -> void
func get_tag() -> String
func set_level(p_level: logger.gd.LogLevel) -> void
func get_level() -> logger.gd.LogLevel
func set_log_record_formatter(p_log_record_formatter: LogRecordFormatter) -> void
func log(p_level: logger.gd.LogLevel, p_message: String, p_log_record: Dictionary = null) -> void
func trace(p_message: String, p_stack_depth: int = 1, p_stack_hint: int = 1) -> void
func debug(p_message: String) -> void
func info(p_message: String) -> void
func warning(p_message: String) -> void
func error(p_message: String) -> void
func close() -> void
func _init(p_message: String, p_threshold_msec: int = 0, p_logger: Logger = null) -> LogTimer
func set_level(p_level: logger.gd.LogLevel) -> void
func set_threshold_msec(p_threshold_msec: int) -> void
func start() -> void
func stop() -> void