Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature request: conversation & event logging. #201
I have started using Syncplay for study sessions with my friend. As we study, we chat back and forth and occasionally come to insights over the chat interface, which are useful to record for future grepping.
Unfortunately, the only way for us to save them currently is by hand. Would it be possible to add an optional dead-simple logging feature? I'm thinking something to the effect of storing logs as plaintext files under the existing
Or they could all be dumped to one continuously updated text file, if one doesn't mind the risk of forming very large files.
Yes it would be possible. I'd be interested in hearing what people think with respect to:
Enabling/disabling should be done in server config as with any other feature. Logging should range from sparse to verbose, optimally.
For instance, in my use case, I'd just want a plaintext log of who said what. In the case of someone running a large server and troubleshooting a problem, they might want a log to tell them in detail what handshake happened and what JSON strings changed hands during the error.
In the case of someone running a private server that was subject to a hacking attempt, they might like to have a log that they can point
Ideally, all these use cases should be satisfied by the same code, so as to minimize the need for future refactoring. Logging should be minimal by default, to protect privacy -- perhaps with logging connections and disconnections like IRC servers typically do by default, but not logging everything that was said.
Since we live in the SystemD era, logging to STDERR is going to be fine for a lot of people, including me -- but some people might like logging to files to be a feature.
Since there are a lot of events to log, and I also wanted to create some sort of event hook system, I think an optimal way to handle these two things would be with a single function -- something like:
Which would simultaneously go on to log the event and optimally trigger external code for custom user scripts. Furthermore,
Hopefully server administrators should know their way around
I am aware that this would add quite a lot of additional configuration options... but on a side note I've been thinking about making a pull request to add a server configuration file -- so maybe I should take care of that first? Here are some config options we'll probably need:
So... let me know what everyone thinks, and if any more input on my part is needed! :)
I think logging feature is cool for client side.
For the servers though, I guess it would go against Syncplay's: "no user data stored" policy.
For the clients, I think logging what's appearing in the GUI should be enough, can't see any reasons for log-levels.