mirror of
https://github.com/ceph/ceph
synced 2024-12-25 21:03:31 +00:00
29d3299497
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
21 lines
599 B
Python
21 lines
599 B
Python
from gevent import monkey
|
|
monkey.patch_all(dns=False)
|
|
from .orchestra import monkey
|
|
monkey.patch_all()
|
|
|
|
import logging
|
|
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
format='%(asctime)s.%(msecs)03d %(levelname)s:%(name)s:%(message)s')
|
|
log = logging.getLogger(__name__)
|
|
|
|
|
|
def setup_log_file(logger, log_path):
|
|
log_formatter = logging.Formatter(
|
|
fmt=u'%(asctime)s.%(msecs)03d %(levelname)s:%(name)s:%(message)s',
|
|
datefmt='%Y-%m-%dT%H:%M:%S')
|
|
log_handler = logging.FileHandler(filename=log_path)
|
|
log_handler.setFormatter(log_formatter)
|
|
logger.addHandler(log_handler)
|