- Supported Minecraft Versions
- 1.20
What is this?
This is SkLogger, a logging utility for Skript.It it similar to the abandoned skript-logs project, but this time it is based on Hippo and skript-reflect.
What are the dependencies?
- Skript 2,7.2 and above- skript-reflect from this build or a released version when one comes out
- Hippo 1.1.
How can I use it?
It is fairly simple.You have an on log event, and 4 paramaters.
- Log level (info, warning, error, severe)
- Logger name (Minecraft or a plugin's name or a class name if you are using plugins from the WorldEdit/WorldGuard family)
- Message (the message itself)
- Time (unix time, it is the amount of seconds passed since January 1st, 1970.)
Keep in mind you can use it in anything you want; Discord webhook, SMS, whatever you want.
Example code:
code_language.skript:
on log:
send "[%log level%] [%logger name%] %message%" to all players where [input has permission "op"]
Notes
- Messages to the console (sent by the send "message" to console effect) are not visible to the logger.- Command output from console commands may not be shown, depending on the command's behavior.