Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

JLogger

An asset by vman103
The page banner background of a mountain and forest
JLogger hero image

Quick Information

0 ratings
JLogger icon image
vman103
JLogger

Simple logging plugin.

Supported Engine Version
4.1
Version String
2.0
License Version
GPLv3
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

= godot-jlogger John Russell [email protected] v1.0, 2024-03-24 :toc: ifdef::env-github[] :imagesdir: https://raw.githubusercontent.com/JohnDevlopment/godot-jlogger/main/README_files/images endif::[] ifndef::env-github[] :imagesdir: ./README_files/images endif::[]

A logging plugin for Godot. It allows you log messages and filter them by log levels. You can also format them in several different ways.

The current version is 2.0; it was edited to conform to Godot's node-based structure.

NOTE: JLogger was developed and tested under Godot version 4.3 stable.

== Installation

There are two ways to install this addon:

== Usage

In your project settings, enable the JLogger plugin. When it's activated, a LoggerNode class is added to the list of nodes available.

image:node-list.jpg[Cannot load image node-list.jpg]

LoggerNode has several properties to modify how and when log messages are printed out.

image:inspector.jpg[Cannot load image inspector.jpg]

Each node contains a reference to a Logger, the actual class responsible for printing log messages. The properties control the name, level, and format options of the underlying Logger.

To use a Logger, you can do this:

[source,gdscript]

Assuming logger_node is a LoggerNode

var logger: Logger = logger_node.logger logger.info("Ths is an info message. Hi! My name is %s!", "Bob")


But if you want, you can just instance a Logger directly. See this example:

[source,gdscript]

func logging_example2() -> void: var _logger := Logger.new(Logger.Level.INFO, "main2", func(_m): pass, "{level} {name}: {msg}", "") _logger.info("I ate %d donuts.", [50])


TIP: You can check the main scene to see a more fleshed out example.

Simple logging plugin.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
JLogger icon image
vman103
JLogger

Simple logging plugin.

Supported Engine Version
4.1
Version String
2.0
License Version
GPLv3
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers