DawnGroveStudios / GodotLogger

gdscript plugin to add a logger equivalent to the zap logger in go
MIT License
33 stars 8 forks source link
gdscript godot godot-engine godotengine logging plugin

GodotLogger

JSON-formatted logger

Settings

var CURRENT_LOG_LEVEL=LogLevel.INFO
var write_logs:bool = false
var log_path:String = "res://game.log"

Command line args

Provide these to your command line if you want to override defaults

log-level=error
use-isotime=true

Singletons

GodotLogger

Classes

Log

Is the class implementation of the singleton logger. The CURRENT_LOG_LEVEL can be set to any of the following levels:

enum LogLevel {
    DEBUG,
    INFO,
    WARN,
    ERROR,
    FATAL,
}

When it is set anything less than the current log level will be filtered out

JsonData

Methods

Config

Will get either flags or env vars for the program and return the value or the default value.

Methods