decisions + logger
This commit is contained in:
parent
962c9a2f38
commit
3f4be8b7ff
3 changed files with 217 additions and 203 deletions
12
crawler/logger.py
Normal file
12
crawler/logger.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import logging
|
||||
|
||||
def createLogger(name):
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
||||
handlers=[
|
||||
logging.FileHandler('app.log'),
|
||||
logging.StreamHandler()
|
||||
]
|
||||
)
|
||||
return logging.getLogger(name)
|
||||
Loading…
Add table
Add a link
Reference in a new issue