Now that the packages include /var/log/ceph/radosgw-agent, default to
storing logs there, named after the configuration file or
radosgw-agent.log if no config file was used.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
import contextlib
import logging
import logging.handlers
+import os.path
import yaml
import sys
help='configuration file'
)
args, remaining = conf_parser.parse_known_args()
+ log_dir = '/var/log/ceph/radosgw-agent/'
+ log_file = 'radosgw-agent.log'
+ if args.conf is not None:
+ log_file = os.path.basename(args.conf.name)
defaults = dict(
sync_scope='incremental',
log_lock_time=20,
+ log_file=os.path.join(log_dir, log_file),
)
if args.conf is not None:
with contextlib.closing(args.conf):