Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

importing pyethereum messes up with standard logging #860

Open
palkeo opened this issue Mar 18, 2018 · 1 comment
Open

importing pyethereum messes up with standard logging #860

palkeo opened this issue Mar 18, 2018 · 1 comment

Comments

@palkeo
Copy link

palkeo commented Mar 18, 2018

Standard, expected behavior:

import logging
logger = logging.getLogger('test')
logging.basicConfig(level=logging.DEBUG)
logger.debug('hi')
DEBUG:test:hi

Now I do the same, but I import pyethereum before:

import logging
from ethereum import vm
logger = logging.getLogger('test')
logging.basicConfig(level=logging.DEBUG)
logger.debug('hi')

Nothing is printed.

That's an unexpected side effect (and pretty hard to debug when I depended on pyethereum very indirectly).
Can you only do that kind of change where pyethereum is used directly as a standalone executable, but not when it's imported?

(also, what' the purpose of having a custom "slogging" module? that's unclear to me)

Thanks,
palkeo.

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

No branches or pull requests

2 participants
@palkeo and others