Beispiel #1
0
def log_debug(*log_info):
    log_str = [str(i) for i in log_info]
    log_str = "".join(log_str)
    caller_frame = sys._getframe().f_back
    #调用者文件名
    filename = caller_frame.f_code.co_filename
    #调用者所在行号
    line_no = caller_frame.f_lineno
    #调用者函数名
    func_name = caller_frame.f_code.co_name

    libatlas.AclLog(_ACL_DEBUG, func_name.encode("utf-8"),
                    filename.encode("utf-8"), line_no, log_str.encode("utf-8"))
Beispiel #2
0
def log_debug(log_info):
    """
    print log_debug  
    """
    log_str = [str(i) for i in log_info]
    log_str = "".join(log_str)
    caller_frame = sys._getframe().f_back
    #Caller file name
    filename = caller_frame.f_code.co_filename
    #Caller line number
    line_no = caller_frame.f_lineno
    #Caller function name
    func_name = caller_frame.f_code.co_name

    libatlas.AclLog(_ACL_DEBUG, func_name.encode("utf-8"),
                    filename.encode("utf-8"), line_no, log_str.encode("utf-8"))