meejah

Results 289 comments of meejah

I find myself a little hesitant to special-case logging: since you have to structure your library to have Twisted and asyncio specific imports to use the rest of txaio, it...

We would like to inter-operate with logging nicely. When using Twisted, the above would be accomplished with "observers". In stdlib logging these are "handlers" (approximately?). As per #autobahn IRC conversation,...

I think maybe what you want to do is this: - not call `start_logging` at all - set up your own handlers (or observers for Twisted) - call txaio's `set_global_log_level()`...

Yes, `ApplicationRunner` currently calls `start_logging` -- can you try either with the 'component' API or by not using `.run()` (e.g. use `.start()` which doesn't set up logging for you). Or...

Okay, so I think we should document that better -- basically "how to do your own logging stuff"

That's "interesting" output, but also that's not how the logging should be used -- you should use the `{name}` syntax, like so: ```python logging.info('Some dict output: {a}', a=1) ```

(That said, I can't explain what happens in the second case ;) )

That syntax is a new string-interpolation syntax in python; the names in `{}`'s correspond to keyword args. Even with the other syntax, you wouldn't typically pass a dict -- instead...

I think we should leave this bug open as an "improve documentation" bug; we don't explicitly describe this syntax (even though it sort-of appears in the examples): http://txaio.readthedocs.io/en/latest/programming-guide.html#logging

txaio is a compatibility library so we can write "the same" code across asyncio and Twisted. The logging system in here is built as a mostly-thin wrapper over Twisted's new...