literalplus / quietcord

A simple BungeeCord plugin which aims to reduce log spam caused by InitialHandler.
MIT License
5 stars 5 forks source link

Added daily logger #8

Closed happyzleaf closed 6 years ago

happyzleaf commented 6 years ago

A client asked me to create a plugin to both suppress and then log the activity related to the pings. I found this plugin and i thought it'd be cool if i made a pull request rather than keeping it for myself.

This will log all the activity (if allowed in the config) in folders based on dates, the technical side is explained through comments inside DailyLogger.java. I've updated the default config as well, but i'm not that good at explaining things... Anyway, i hope you like this :)

literalplus commented 6 years ago

First of all, huge thanks for submitting your contribution back to this project! From a quick look, your code looks reasonable. However, as far as I can see, this feature is slightly out of scope for this plugin, especially considering that one of its core values is to be lightweight.

If you would like to maintain this feature, you are more than welcome to make a fork, which I could also provide a link to in the Readme for interested users.

Here's the conversation we had on Twitter for reference for anyone stumbling upon this:

Literallie: Hi, thanks for your contribution! I don't really get what this is for, could you summarise a general use case in a few words? happyzleaf: I guess, curious server admins? [...] happyzlife: I've wrote that in the pull request, it's to log every activity inside files (like /QuietCord/logs/2018-06-15.ynl) happyzlife: Like joins and pings, and they're all summed, let's say if an ip pings 10 times it won't be written 10 times, but there will be "10" written after its ip Literallie: hm, I see Literallie: so it saves log files in YAML format? happyzleaf: Yes Literallie: That looks like a thing that could be useful to a very narrow user base - I think it can make sense, but one of the principles I've been following with this project is lightweightness over feature richness. It's just not what the plugin is intended to do. If I were to need that kind of log analysis, I would implement it with a proper database and queries, which is definitely out of scope for this plugin.