-
Notifications
You must be signed in to change notification settings - Fork 0
/
py_logger.yml
39 lines (36 loc) · 1.03 KB
/
py_logger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
%YAML 1.2
---
logging:
version: 1
disable_existing_loggers: true
# Configuring the default (root) logger is highly recommended
root:
level: !!python/name:logging.NOTSET
handlers: [console]
loggers:
# Logging from my application
aria2_hook:
level: !!python/name:logging.DEBUG
handlers: [logfile]
qualname: post_crawl.aria2_download_hook
propagate: false
query_new_build:
level: !!python/name:logging.DEBUG
handlers: [logfile]
qualname: post_crawl.query_new_build
handlers:
logfile:
class: logging.FileHandler
filename: /tmp/post-crawl.log
formatter: simpleFormatter
level: !!python/name:logging.NOTSET
console:
class: logging.StreamHandler
stream: ext://sys.stdout
formatter: simpleFormatter
level: !!python/name:logging.NOTSET
formatters:
simpleFormatter:
class: !!python/name:logging.Formatter
format: '[%(name)s]%(asctime)s %(funcName)s %(levelname)s :: %(message)s'
datefmt: '%d/%m/%Y %H:%M:%S'