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

[Request]Console output logging #14

Open
skeith opened this issue Jan 11, 2018 · 3 comments
Open

[Request]Console output logging #14

skeith opened this issue Jan 11, 2018 · 3 comments

Comments

@skeith
Copy link
Contributor

skeith commented Jan 11, 2018

I would like to request console output logging to a file.

@wlerin
Copy link
Owner

wlerin commented Feb 23, 2018

despite what I said on discord, this is fairly easy to implement... you just need to rewrite main.py, or add to it

specifically, add another TimedRotatingFileHandler that only "logs" INFO level messages, the way the console_handler does here:
https://github.com/wlerin/showroom/blob/master/showroom/main.py#L42

In fact I think you can add more log handlers at a whim, without even needing to change that file.

I'd like to revise how all of that is done though, it's pretty hackish.


iirc though the reason you wanted this is much easier to accomplish by reading schedule.json

@skeith
Copy link
Contributor Author

skeith commented Feb 23, 2018

I thought about reading the json using tail. I'll take a look again.

@wlerin
Copy link
Owner

wlerin commented Feb 23, 2018

The json needs to be fully reparsed, it can't just be read piecemeal. It's not very large so that shouldn't be a problem. Just watch the file for changes (i.e. check the modification date) and read it in when it updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants