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

provide a way to silence "failed to read..." matron spam (in repl) #404

Closed
pq opened this issue Jun 6, 2018 · 11 comments
Closed

provide a way to silence "failed to read..." matron spam (in repl) #404

pq opened this issue Jun 6, 2018 · 11 comments
Milestone

Comments

@pq
Copy link
Collaborator

@pq pq commented Jun 6, 2018

image

periodically, i see streams like this coming from matron.

fprintf(stderr, "failed to read battery percentage\n");

is it adding any value? if not, it'd be great to have a way to filter this out.

assuming these messages should keep going to stderr, it may be easiest (but not best?) to do this in maiden? (cc @ngwese)

dunno.

@pq pq added the enhancement label Jun 6, 2018
@simonvanderveldt
Copy link
Member

@simonvanderveldt simonvanderveldt commented Jun 6, 2018

Ideally we'd fix the cause of these failures, so far not sure what's causing them though :(
See monome/norns-image#43

@pq
Copy link
Collaborator Author

@pq pq commented Jun 6, 2018

yeah. not great to just drop them on the floor. on the other hand, it's a bit noisy in the repl and could make folks think there's something up with the device.

@tehn
Copy link
Member

@tehn tehn commented Jun 7, 2018

i'm fine to just mute these battery warnings for now and open a ticket to investigate.

the code should also handle the fail more gracefully, ie, don't corrupt the previous read.

@simonvanderveldt
Copy link
Member

@simonvanderveldt simonvanderveldt commented Jun 7, 2018

Where does the repl get these logline from? Does it show all messages sent to stderr?

@pq
Copy link
Collaborator Author

@pq pq commented Jun 7, 2018

@simonvanderveldt: i believe so. @ngwese can confirm?

@ngwese
Copy link
Member

@ngwese ngwese commented Jun 7, 2018

the repl prints whatever ws-wrapper sends. i don’t remember if it captures both stdout and stderr or just stdout (from matron).

@pq
Copy link
Collaborator Author

@pq pq commented Jun 7, 2018

@ngwese : is there any way to know whether we're getting (or sending) stderr? (i'm thinking it would be great to be able to render the output differently.)

EDIT: i'm sure this is a way; i guess i should rephrase and ask for your thoughts on how we might differentiate. looking at ws-wrapper now...

@catfact catfact added the matron label Jun 9, 2018
@pq
Copy link
Collaborator Author

@pq pq commented Jun 13, 2018

an interesting possible data point regarding the cause of the errors: i've only noticed the errors when my norns has been powered (specifically by my macbook). i don't think i've seen the errors when self-powered...

@ngwese
Copy link
Member

@ngwese ngwese commented Jun 13, 2018

@pq regarding separation of stderr from stdout in the repl- there’s only one stream sent over the websocket right now. ws-wrapper would need to change and a simple protocol introduced.

@pq
Copy link
Collaborator Author

@pq pq commented Jun 13, 2018

an interesting possible data point regarding the cause of the errors: i've only noticed the errors when my norns has been powered (specifically by my macbook). i don't think i've seen the errors when self-powered...

seeing this correlation again. also fairly certain that the battery is fully charged when it occurs FWIW.

@markwheeler
Copy link
Collaborator

@markwheeler markwheeler commented Jun 23, 2018

Had this happen today whilst norns was running on mains power, no other connections.

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

Successfully merging a pull request may close this issue.

6 participants