]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
report back to the user when falling back with the log location 25/head
authorAlfredo Deza <adeza@redhat.com>
Tue, 10 Mar 2015 18:53:39 +0000 (14:53 -0400)
committerAlfredo Deza <adeza@redhat.com>
Tue, 10 Mar 2015 18:53:39 +0000 (14:53 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
radosgw_agent/cli.py

index 96a4caa43264550b302fee71b23a248c485a585e..176a971878e90bc317ac7e537fa33ef0a1d6e46e 100644 (file)
@@ -269,7 +269,10 @@ def main():
     log_file = args.log_file or 'radosgw-agent.log'
     try:
         fh = logging.handlers.WatchedFileHandler(log_file)
-    except IOError:
+    except IOError as err:
+        agent_logger.warning('unable to use log location: %s' % log_file)
+        agent_logger.warning(err)
+        agent_logger.warning('will fallback to ./radosgw-agent.log')
         # if the location is not present, fallback to cwd
         fh = logging.handlers.WatchedFileHandler('radosgw-agent.log')