]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
set the stream logging before anything else 24/head
authorAlfredo Deza <adeza@redhat.com>
Mon, 9 Mar 2015 17:52:42 +0000 (13:52 -0400)
committerAlfredo Deza <adeza@redhat.com>
Mon, 9 Mar 2015 17:52:42 +0000 (13:52 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
radosgw_agent/cli.py

index 34ea49d5b07d1c52b98bf5ad2909d003fa48a275..b888cbc8d7abffdfede5bc668917cc2e27c4a3f4 100644 (file)
@@ -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