Giter Club home page Giter Club logo

godotlogger's Introduction

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

  • GodotLogger.debug(msg,data)
  • GodotLogger.info(msg,data)
  • GodotLogger.warn(msg,data)
  • GodotLogger.error(msg,data)
  • GodotLogger.fatal(msg,data)

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

  • marshal(obj:Object,compact:bool=false,compressMode:int=-1,skip_whitelist:bool=false) -> PackedByteArray:

  • unmarshal(dict:Dictionary,obj:Object,compressMode:int=-1) -> bool:

  • unmarshal_bytes_to_dict(data:PackedByteArray,compressMode:int=-1) -> Dictionary:

  • unmarshal_bytes(data:PackedByteArray,obj:Object,compressMode:int=-1) -> bool:

  • to_dict(obj:Object,compact:bool,skip_whitelist:bool=false) ->Dictionary:

Config

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

Methods

  • get_var(name,default=""):

  • get_int(name,default=0) -> int:

  • get_bool(name,default=false,prefix:String="") -> bool:

  • get_custom_var(name,type,default=null):

godotlogger's People

Contributors

seann-moser avatar jimmyloar avatar chrisknyfe avatar admincrystal avatar rothiotome avatar cstaaben avatar loufe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.