mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-03 17:39:16 +02:00
Move logger initialization in __init__.py to be able to use it from any module
This commit is contained in:
parent
cbf3386bac
commit
cdef038323
1 changed files with 8 additions and 0 deletions
|
@ -1,4 +1,12 @@
|
|||
from future import standard_library
|
||||
standard_library.install_aliases()
|
||||
import logging
|
||||
logger = logging.getLogger('Prismedia')
|
||||
logger.setLevel(logging.INFO)
|
||||
ch = logging.StreamHandler()
|
||||
ch.setLevel(logging.INFO)
|
||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s: %(message)s')
|
||||
ch.setFormatter(formatter)
|
||||
logger.addHandler(ch)
|
||||
|
||||
from . import upload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue