SLF4J Godot Logger

SLF4J logger for Godot's Kotlin (JVM) bindings

License

License

Categories

Categories

SLF4J Application Layer Libs Logging
GroupId

GroupId

com.degrendel
ArtifactId

ArtifactId

slf4j-godot
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

SLF4J Godot Logger
SLF4J logger for Godot's Kotlin (JVM) bindings
Project URL

Project URL

https://github.com/sirnuke/godot-kotlin-jvm-slf4j
Source Code Management

Source Code Management

https://github.com/sirnuke/godot-kotlin-jvm-slf4j

Download slf4j-godot

Dependencies

compile (2)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.30
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.32

runtime (1)

Group / Artifact Type Version
com.utopia-rise : godot-library jar 0.1.4-3.2.3

Project Modules

There are no modules declared in this project.

SLF4J Godot

A simple logger implementation for SLF4J that redirects logging to Godot's print and printerr. Intended for use with the Godot Kotlin JVM bindings.

Usage

Add the following to your Gradle configuration:

Gradle (Groovy)

dependencies {
    implementation 'com.degrendel:slf4j-godot:0.1.0'
}

Gradle (Kotlin)

dependencies {
  implementation("com.degrendel:slf4j-godot:0.1.0")
}

Load the logger with the standard procedure, such as

companion {
  private val log = LoggerFactory.getLogger(ParentClass::class.java)
}

See example module for detailed usage. Once constructed, use as any normal SLF4J logger.

Customization

If you need output at a level lower than Info, I recommend casting the logger to GodotLogger and setting currentLogLevel to LocationAwareLogger.TRACE_INT or LocationAwareLogger.DEBUG_INT. If you need to customize the output format or overall output level, I suggest copying the three classes in the lib directory to your project and making the appropriate changes to GodotLogger.

Or if there's a serious use-case, complain in the issues and I'll write an appender implementation for logback-classic.

Versions

Version
0.1.0