예제 #1
0
def get_log_file():
    pj_logs_dir = EnvManager().get_env_var("PJ_LOGS_DIR")
    cfg_reader = UtilsManager().get_config_parser()
    try:
        log_file = cfg_reader.get('main', 'LOG_FILE')
    except Exception as e:
        print "Error while getting log file", e.args
        return (StatusCodes.ERROR)
    return os.path.join(pj_logs_dir, log_file)
예제 #2
0
def get_log_file_attribs(get_byte_size=True, bck_count=True):
    cfg_reader = UtilsManager().get_config_parser()
    try:
        byte_size = cfg_reader.get('main', 'LOG_FILE_MAX_SIZE')
        byte_size = cfg_reader.get('main', 'LOG_FILE_NUM_BACKUPS')
    except Exception as e:
        print "Error while getting log file", e.args
        return (StatusCodes.ERROR)

    return (get_log_file(), byte_size, byte_size)