From 4f1da6219b19a5ab451666e103196d980223149a Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 9 Mar 2015 13:52:42 -0400 Subject: [PATCH] set the stream logging before anything else Signed-off-by: Alfredo Deza --- radosgw_agent/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.47.3