UniF-Logger 图标

UniF-Logger

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/unif-logger
资源信息

Minecraft 版本: 1.20.2

平台: datapack

标签: library

资源介绍

Usage

Before logging, you must tag yourself unif.debug

And the following is a logging example.

[0:1000] [INFO] (NAMESPACE) MESSAGE
  • [0:1000] is the time of the game when logging. It means that log was created at the time of 1000 on the day 1 of the game.
  • [INFO] is the type of the logging. There are a total of 6 levels, ALL < DEBUG < INFO < WARN < ERROR. And type TIPS is displayed to normal players, it has no stoarge.
  • (NAMESPACE) is the namespace of the logging.

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
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
repixel

价格:0 墨喵币
下载量:0

查看详情
Bonemeal to bones (mod)

价格:0 墨喵币
下载量:0

查看详情
zalks modpack

价格:0 墨喵币
下载量:0

查看详情
Dynamic Fullbright

价格:0 墨喵币
下载量:0

查看详情