From: Alfredo Deza Date: Tue, 10 Mar 2015 18:53:39 +0000 (-0400) Subject: report back to the user when falling back with the log location X-Git-Tag: v1.2.2~7^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=806b6e8e23e9bfadab2f22a5a6638da4da91d641;p=radosgw-agent.git report back to the user when falling back with the log location Signed-off-by: Alfredo Deza --- diff --git a/radosgw_agent/cli.py b/radosgw_agent/cli.py index 96a4caa..176a971 100644 --- a/radosgw_agent/cli.py +++ b/radosgw_agent/cli.py @@ -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')