Memsql-studio log rotation

I looked through the documentation but could not find anything explaining how to rotate the logs of memsql-studio. It does not seem to react to SIGUP. Could you please advise?

Thanks

Hey @celer-tech,

Studio does not support any type of log rotation mechanism.

Are your logs getting large enough that you’d want to rotate them? We haven’t really considered this, but is something we can add to our roadmap.

Just so we’re on the same page, what exactly would you expect happens when the memsql-studio daemon/process receives a SIGHUP?

Thanks for your answer. Ideally, the application should have a configuration dictating how the log should be rotated.
Failing this, then you should implement what is available for the trace logs of memsql server so the user is able to send a signal to the process to re-open the log file so it can be rotated via a third party application like logrotate.

Having a single logging framework across all your components would be the best way forward in my opinion.

@celer-tech if you run memsql-studio as a regular daemon with systemd, it will log to stdout which means that journalctl will work as a log manager. This way, you don’t need to keep a log file and you also don’t need to worry about rotating this log file. Notice that journalctl itself supports configuring various retention settings (by size or time).

This is a consistent behavior across our CLI tools.

HI, this won’t work for us as we don’t want to be running anything that requires root access to configure or manage.

Regards.

@celer-tech Are you sure that using journalctl requires root access? I found systemd: how do I view journals with journalctl without switching to root on CentOS 7? - Server Fault and I’m also fairly sure systemd itself can be partly managed by non-root users.

I’m not entirely sure but just looking at the link you provided, the first line of the answer is a sudo command to add the user to a specific group. So it does need elevated privileges.
I’ll work around this by stopping the app, renaming the log file and restarting it on a weekly basis but it would be nice if there was a logging framework provided for the memsql products.