Logger.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:StructEngPy 作者: zhuoju36 项目源码 文件源码
def info(log:str,target='console'):
    """
    log: text to record.
    target: 'console' to print log on screen or file to write in. 
    """
    if target=='console':
        thd=threading.Thread(target=print,args=(ctime(),':',log))
        thd.setDaemon(True)
        thd.start()
        thd.join()
    else:
        try:
            thd=threading.Thread(target=print,args=(ctime(),':',log))
            thd.setDaemon(True)
            thd.start()
            thd.join()
        except Exception as e:
            print(e)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号