forked from Lispython/human_curl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug.py
29 lines (20 loc) · 736 Bytes
/
debug.py
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
human_curl.debug
~~~~~~~~~~~~~~~~~~~~~~~~~~
Debuggging tests for human_curl
:copyright: (c) 2011 by Alexandr Lispython ([email protected]).
:license: BSD, see LICENSE for more details.
"""
import logging
from .tests import *
logger = logging.getLogger("human_curl")
logger.setLevel(logging.DEBUG)
# Add the log message handler to the logger
# LOG_FILENAME = os.path.join(os.path.dirname(__file__), "debug.log")
# handler = logging.handlers.FileHandler(LOG_FILENAME)
handler = logging.StreamHandler()
formatter = logging.Formatter("%(levelname)s %(asctime)s %(module)s [%(lineno)d] %(process)d %(thread)d | %(message)s ")
handler.setFormatter(formatter)
logger.addHandler(handler)