From: Alfredo Deza Date: Mon, 9 Mar 2015 17:52:42 +0000 (-0400) Subject: set the stream logging before anything else X-Git-Tag: v1.2.2~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4f1da6219b19a5ab451666e103196d980223149a;p=radosgw-agent.git set the stream logging before anything else Signed-off-by: Alfredo Deza --- diff --git a/radosgw_agent/cli.py b/radosgw_agent/cli.py index 34ea49d..b888cbc 100644 --- a/radosgw_agent/cli.py +++ b/radosgw_agent/cli.py @@ -262,6 +262,9 @@ def main(): sh.setFormatter(util.log.color_format()) sh.setLevel(console_loglevel) + agent_logger = logging.getLogger('radosgw_agent') + agent_logger.addHandler(sh) + # File handler log_file = args.log_file or 'radosgw_agent.log' fh = logging.handlers.WatchedFileHandler(log_file) @@ -269,8 +272,6 @@ def main(): fh.setFormatter(logging.Formatter(util.log.BASE_FORMAT)) root_logger.addHandler(fh) - agent_logger = logging.getLogger('radosgw_agent') - agent_logger.addHandler(sh) dest = args.destination dest.access_key = args.dest_access_key