HomeJavaDatapacksUniF-Logger
UniF-Logger

Usage

Before logging, you must tag yourself unif.debug

And the following is a logging example.

[0:1000] [INFO] (NAMESPACE) MESSAGE

After logging but logging of DEBUG, all logging will record into stoarge unif.logger:logs, and there are also 4 stoarges: unif.logger:debug_logs, unif.logger:info_logs, unif.logger:warn_logs, unif.logger:error_logs.

When the logs is going to be too big, it will auto delete the last log in logs.

General Logger

This is a example to print a general logging.

function #unif.logger:logger/v1/info {"msg": 'Here\'s some messages!', "namespace": "Test"}

Injected Logger

Warning: Warning: Injected Logger can inject clickable JSON fields like clickEvent.

function #unif.logger:injected_logger/v1/info {"msg": "{\"text\":\"Injected Info Test\"}", "namespace": "Test"}

function #unif.logger:injected_logger/v1/info {"msg":"{\"text\":\"Injected Info Test\",\"hoverEvent\":{\"action\":\"show_text\",\"contents\":\"aa\"}}","namespace":"UniF-Logger"}

Logs

Read logs

You can use the following functions to read logs in the past.

function #unif.logger:logs/v1/read_all
function #unif.logger:logs/v1/read_debug
function #unif.logger:logs/v1/read_info
function #unif.logger:logs/v1/read_warn
function #unif.logger:logs/v1/read_error

Clear logs

You can use the following functions to clear logs.

function #unif.logger:logs/v1/clear_all
function #unif.logger:logs/v1/clear_debug
function #unif.logger:logs/v1/clear_info
function #unif.logger:logs/v1/clear_warn
function #unif.logger:logs/v1/clear_error
Quick facts

Install steps are the general flow for this file type — see the MC Java Mods guides for the full walkthrough.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more