Dump command
emilyy-dev opened this issue ยท 6 comments
Description
A new command for debugging purposes: /lp setting|settinginfo|configinfo <setting>
Proposed behaviour
It would make and report various checks regarding the config setting specified:
- Is it present / not null?
- Current value (fallback value if not present / null, letting the user know of its invalid state)
- Is reloadable?
- Setting type (list of x, storage type, string, integer, etc)? (If it isn't the one expected, maybe let the user know of the invalid state)
Maybe suggest/check for settings listed in ConfigKeys first (e.g. sync_time
) but additionally allow for "raw" lookups (e.g. meta-formatting.prefix.end-spacer
).
I am willing to work on (or at least be part of) this, just wanted to know some general opinions :)
the following are excerpts from a chat on discord:
make lp debug
which dumps all data (except users) into a json and ships it to a web viewer
and then lp debug --full
which includes users
by everything I mean editor data, but also config and server startup and other plugins involved
@Turbotailz could make a web viewer for that
it will send everything so we can cross reference and check startup logs while also checking lp info and group names and literally everything at once
we don't need to keep asking for more things
"send lp debug link and we'll tell you what's wrong" is much easier than
send console log
send lp info
send config
etc etc
(with back and forth time in between each)
then the web viewer can have good navigation function
so you can open the config with one click and go to the editor with another and fly around looking at all possible causes for a problem
My apologies for the formatting, just putting these ideas here real quick
The debug command was removed because nobody was really using it!
I'd be happy to add it back, although it would be nice if we could time it with some sort of viewer on luckperms.net.
Even if that just means a simple page that can render JSON as-is in a pretty way, kinda like the viewer on https://jsonformatter.curiousconcept.com/
https://myst729.github.io/vue-json-tree/ or https://github.com/chenfengjw163/vue-json-viewer#preview could work
Is it also possible to autodetect any issues?
This is only for the easy to fix issues. This to solve a lot of frustrations and discord talk.
This can detect for example conflicting perm-plugins, conflicting config options and more.
This detecting can also in discord with the bot, I thought I've seen this in other discords (DiscordSync). This saves a lot of time for the helpful people
My current idea for this is just a "simple" /lp dump
that dumps into bytebin a whole lot of info about both LuckPerms and the server, not any kind of auto-detection system or anything of the like; this would include the LuckPerms config file (excluding of course any kind of sensitive information), the data collected in /lp info
(database ping, groups & users count, server name and brand, etc.), an editor link, a plugins/mods list, server info (mainly online-mode
and bungeecord
if on spigot; ip_forward
and online_mode
if on bungee etc), contents of the contexts.json
file and probably something else I'm forgetting right now.
This is mainly to alleviate and ease out the act of providing support, make it faster instead of "could you send an editor link?", "could you send your LP config?", "screenshot /plugins
", "screenshot /lp info
", this would put all of that in a single command and provide the user with a bytebin link to send to the discord server :)
It would be beneficial to provide this info in the editor payload as well, since thousands of people use it every day, it would be a great opportunity to provide users with any extra info that could help them resolves any issues they might not even know they have. I doubt many people will know this debug command even exists.