Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log to file #88

Open
sr-gi opened this issue Aug 9, 2022 · 5 comments
Open

Log to file #88

sr-gi opened this issue Aug 9, 2022 · 5 comments
Labels
docs Documentation related feature request New feature or request

Comments

@sr-gi
Copy link
Member

sr-gi commented Aug 9, 2022

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.

@sr-gi sr-gi added feature request New feature or request good first issue Good for newcomers labels Aug 9, 2022
@mariocynicys
Copy link
Collaborator

In defense of simple_logger since it's indeed a very simple, lightweight crate:
This might be a fairly simple feature to add.

@sr-gi
Copy link
Member Author

sr-gi commented Aug 15, 2022

Looks like this may be harder than it looks, but it has been requested as a feature, but the issue was closed :( borntyping/rust-simple_logger#21

The general solution is redirecting on cmd borntyping/rust-simple_logger#16

@sr-gi
Copy link
Member Author

sr-gi commented Jan 23, 2023

I'm also going to link #176 since this is somewhat of a solution for it

@sr-gi
Copy link
Member Author

sr-gi commented Feb 16, 2023

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?

@mariocynicys
Copy link
Collaborator

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

@sr-gi sr-gi added docs Documentation related and removed good first issue Good for newcomers labels Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants