Project MMO

Project MMO

MsLoggy Logging System

This is a custom system for PMMO that allows for granular control over what logged by the mod. If you are not familiar, information such as statuses and errors are only printed to the game's logs if a mod does so. Most mods do this indiscriminately or rely on logging levels defined when you launch the game. MsLoggy takes this one step further and adds deeper control.

Logging Levels

Universal to all logging platforms are the five (5) main logging levels.

Logging LevelGeneral Purpose
INFOGeneral information such as loading statuses and progress
DEBUGTechnical information used in solving issues
WARNProblematic issues that may or may not need attention
ERRORIncorrect behavior that may be causing problems
FATALIncorrect behavior catastrophic to program function

Project MMO uses these but adds an extra layer on top to let you filter what is shown by each of these levels. By default all levels are enabled and will show all log information that is logged through them.

Logging Categories

MsLoggy adds in logging categories which filter what each logging level shows according to what you want to see.

Log CodeGeneral Purpose
"api"Logs actions related to API usage, such as registrations
"autovalues"Logs information about AutoValues functionality
"chunk"Logs data related to chunk storage, such as placed block records
"data"Logs information related to datapacks and configurations and the underlying processing of that information
"event"Logs event information
"feature"Logs information related to features like vein mining, mob scaling, etc
"gui"Logs gui-related information
"loading"Logs information related to the loading of pmmo
"network"Logs information related to packet flow
"xp"Logs information related to the gain and manipulation of xp
"none"A placeholder for logging levels when you want nothing logged for that level

Using Categories

MsLoggy is configured in pmmo-common.toml. Each Logging Level has an array [] which allows you to add categories you want logged. For example if you wanted to log what your datapack configurations look like as well as what Autovalues are being generated, you would use:

INFO = ["data", "autovalues"]

If you were having issues with datapacks you might want more technical information and so adding "data" to the DEBUG list might also be helpful.

INFO = ["data", "autovalues"]
DEBUG = ["data"]

The next section will break down every logging aspect and category, so you can see exactly what you are logging when adding categories to these lists.

All Logging Levels, Categories, and Data Points

LevelCategoryLog Output
INFOapi- level provider registered
- object predicate registered
- tooltip supplier is null
- tooltip supplier created with item listed
INFOautovaluesunused
INFOchunkunused
INFOdata- lists all configurations loaded from file with corresponding data
- logs when each data loader starts their load
- logs isTagFor detection and config cloning
INFOevent- damage type and target when dealing damage
- break speed event new and old values after perks are applied
INFOfeatureunused
INFOguiunused
INFOloading- when loading xp data from file
- when calculating xp levels from config to cache
- when server load process is complete
INFOnetwork- when packets are registered (not practical for general user)
INFOxp- what XP is gained each event proc
- Xp gains after bonuses are applied
- Xp gains after anti-cheese reductions
DEBUGapi- lists perks when registered
DEBUGautovalues- item requirement maps, when generated
- item xp maps when generated
- tool scaling values, when generated
- armor scaling values, when generated
DEBUGchunk- (de)serialized chunk maps when chunks are (un)loaded
DEBUGdata- lists all objects and data loaded per loader
- lists override configs from CT and API
- marks the start of tag processing
- xp values when retrieved from data
- when the NBT cache is used instead of evaluating the entries
DEBUGevent- lists output maps from all mergemap functions
- logs when the break speed cache is used
- when damage is dealt by the player, logs the damage type, source ID, pre-perk damage, post-perk damage, and final damage type and output damage
- when damage is received by the player, log damage type, source ID, and post-perk modified output damage
DEBUGfeature- vein target sent to server by client
- server-set vein pos and player
- players near a mob when spawning used by mob scaling
- mob scaling attributes set when mob is spawned
- per attribute, mob scaling modifier
- players in a party when party is created/checked
- vein consumed on vein block break
- current vein capacity this half-tick
- Vein shape when sent to server
- perk ID when executed by an event
- if the player is AFK and their duration and cooldown values
- random chance value for treasure procs
DEBUGgui- gain list entry duration
DEBUGloadingunused
DEBUGnetwork- when another player experience packet is received on the client
- packet size when received on the client for data syncs
- server receipt for client request of another player XP
DEBUGxp- calculated bonus map
- client side skill map after xp update packet
- anti-cheese AFK tracker reduction amount
- client handled xp update packet with xp values
- client received updated level cache
- server sent updated skills packet to client
WARNapi- invalid event listener was removed
WARNautovaluesunused
WARNchunkunused
WARNdataunused
WARNeventunused
WARNfeatureunused
WARNguiunused
WARNloadingunused
WARNnetworkunused
WARNxpunused
ERRORapi- award map could not be deserialized
- award map could not be serialized
ERRORautovaluesunused
ERRORchunk- chunk data could not be serialized
ERRORdataUsed by Scripting to identify when parameters or nodes are misused
ERROReventunused
ERRORfeatureunused
ERRORguiunused
ERRORloadingunused
ERRORnetworkunused
ERRORxpunused
FATALALLunused