Skip to content

Conversation

@yeraydiazdiaz
Copy link
Contributor

Also bump h2 version to >=3.1.1.

@sethmlarson
Copy link
Contributor

I was thinking we'd have DEBUG for everything besides data transfer and then set TRACE for readers / writers with raw data going in and out. What do you think about that?

@yeraydiazdiaz
Copy link
Contributor Author

Sorry, I'm not sure what you mean with setting TRACE of readers and writers.

@sethmlarson
Copy link
Contributor

Basically the raw data getting sent/received over streams should be logger.trace() and everything else should be logger.debug() because raw data is pretty verbose.

I had an example logging setup on a different dispatcher that I'd like everyone to look at and see what they think.

@yeraydiazdiaz
Copy link
Contributor Author

That's what I thought you meant but I there's no trace method in logger? Or am I missing something?

@florimondmanca
Copy link
Contributor

florimondmanca commented Aug 23, 2019

@yeraydiazdiaz You're right, although it has been suggested before.

Logging levels are extensible though — example inspired from this comment:

# logging.py
import logging
TRACE = 5
logging.addLevelName(TRACE, 'TRACE')

Then you could write:

from ..logging import TRACE

logger.log(TRACE, "Stream [%d] - Received response events: %r", stream_id, data)

Is this the kind of setup you were thinking about, @sethmlarson?

@sethmlarson
Copy link
Contributor

Going to close this in favor of #277

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants