Command to insert a log manually
GenSecrets opened this issue ยท 1 comments
Background
Currently, we have specific items that spawn from other plugins (we use numerous plugins, some custom made by our devs, some not, most of them run console commands to trigger events). When the items spawn from either blocks or command, they're not always logged in prism, it depends on how they're spawned. If a player spawns them in via command then yes we can find that in prism logs. However, if an item naturally spawns (such as when a player causes the server to spawn a special custom item for them at their location) then it's not logged. Another example is when we are in the console and broadcast something from the console ("broadcast This is a test!") it will not appear in logs. Same thing if we have another plugin run that broadcast message as a console command. However, if I as a player in game run "/broadcast This is a test!" then yes it logs just fine
Ideal solution
A new command that both can be used by the server and by a player with an admin permission, that is like "/prism log <entity> <action> [additional record filling details]"
- This of course would look for different "record filling details" for each type of log and then denote the log entry
Optionally: You could also NOT let us choose <entity> and <action> but rather just make a new action type called "inserted record" or "logged" or something similar and the command and output would be: "/prism log <details> - GenSecrets logged 'This was a test'
- console logged 'Player found an Epic Artifact'
- console logged 'Broadcasted: This is a test!'
This second alternative here might be easier/better and also simply would have a key/value, similar to current logs with the entity that ran it (typically being console or the player in game), and then whatever they typed in <details>
Describe alternatives you've considered
Alternatively something similar could be added in the API? I have little experience with the API and our dev's are taxed as is so making something from our side while seemingly easy could also be a few months down the pipeline due to other projects. But overall, ideally it would be a main plugin feature via a command. If the addition of this command isn't feasible then more console support could accomplish similar things(ie logging when the console runs a particular command etc, maybe a list of whitelisted commands in a config somewhere). This suggested command would just allow us to input it wherever we need. For instance, if we have a plugin we could have it run the command for us when we want it to log something for us. OR say a staff member was at an area and wants to leave a note in the logs for other staff members in case they have to do any rollbacks/restores at that area, then they could drop "/prism log <details>"
Additional context
- Ideally, it would attempt to fill in time and location as well so that the logs could be teleported to if applicable, if not then it would fill in a default value (whatever your common practice is for similar scenarios when no location/time should be attached to something)
This repository is no longer active. You can try to resubmit this at the current Prism repo here https://github.com/prism/PrismRefracted