def _get_log_file_path(conf, binary=None): logfile = conf.log_file logdir = conf.log_dir if logfile and not logdir: return logfile if logfile and logdir: return os.path.join(logdir, logfile) if logdir: binary = binary or handlers._get_binary_name() return '%s.log' % (os.path.join(logdir, binary),) return None
def _get_log_file_path(conf, binary=None): logfile = conf.log_file logdir = conf.log_dir log_org = None logs_path = dict() if logfile and not logdir: log_org = logfile if logfile and logdir: log_org = os.path.join(logdir, logfile) if logdir: binary = binary or handlers._get_binary_name() log_org = '%s.log' % (os.path.join(logdir, binary), ) logs_path['org'] = log_org logs_path['fmt'] = log_org[:-4] + '_fmt' + log_org[-4:] return logs_path