Closed setazer closed 7 years ago
@setazer, thanks for the report.
Fixed in v0.9.9
I removed logging.basicConfig(...)
call from the library completely to let an end-user decide logging format and other options.
Check the README section how to work with logging from now on.
if I import logging and vk_requests modules at same time and configure new logger
import vk_requests, logging
ololo = logging.getLogger("Ololo")
ololo.setLevel(logging.DEBUG)
o_ch = logging.StreamHandler()
o_ch.setFormatter(logging.Formatter('%(asctime)s - Test - %(levelname)-8s %(message)s'))
ololo.addHandler(o_ch)
ololo.info('test')
It actually doubles logs:
2017-07-17 19:22:14,034 - Test - INFO test
2017-07-17 19:22:14,034 INFO [Ololo] test
If I remove vk_requests module from import - logs behave like normal:
2017-07-17 19:22:23,769 - Test - INFO test
Fix it pls