rust-teos
rust-teos copied to clipboard
Log to file
simple_logger doesn't seem to allow logging to a file. Currently, we can run teos like:
teosd >> teos.log
And that would do, but it may be nice to have this out of the box. Find a simple and lightweight replacement for simple_logger that allows this and do the proper changes.
In defense of simple_logger since it's indeed a very simple, lightweight crate:
This might be a fairly simple feature to add.
Looks like this may be harder than it looks, but it has been requested as a feature, but the issue was closed :( https://github.com/borntyping/rust-simple_logger/issues/21
The general solution is redirecting on cmd https://github.com/borntyping/rust-simple_logger/issues/16
I'm also going to link #176 since this is somewhat of a solution for it
I think we should keep this, but maybe remove the good first issue tag and tag it as docs or something.
There is currently a solution for this for Linux via systemd and you can also go the teosd >> teos.log route.
Thoughts @mariocynicys?
To me, this would only make sense if the tower can be ran as a detached daemon.
It's cleaner to start teosd in:
teosd --daemon --logfile FILE fashion (and actually have daemon and logfile specified in the config instead) than teosd --daemon >> FILE.
But since I start my tower like teosd >> FILE & anyway, where the log file is specified isn't an issue in that regard since I have to write that trailing ampersand.
This might be a bit of a biased opinion tbh.
side note: sorry I don't like systemd services :p