|
def | __init__ (self, path, print_flag=False, save_flag=False, max_clear=10) |
|
def | template (self, LogStatus status, *content, **kwargs) |
|
def | info (self, *content, **kwargs) |
|
def | warn (self, *content, **kwargs) |
|
def | error (self, *content, **kwargs) |
|
def | log_util (self, path_str, *content) |
|
def | get_path (self, end_path) |
|
def | __new__ (cls, *args, **kwargs) |
|
|
def | pure_log (msg, **kwargs) |
|
def | format_text (LogStatus field, line, obj, task_name, msg, ned_text=False, ConsoleColor.FontColor text_color=None) |
|
def | log (msg, obj=None, line=sys._getframe().f_back.f_lineno, task_name='TEXT', LogObject=None, LogStatus field=LogStatus.Info, func=None, ConsoleColor.FontColor text_color=None, **kwargs) |
|
def | warning (**kwargs) |
|
def | log_error (msg, obj=None, line=sys._getframe().f_back.f_lineno, task_name='ERROR', LogObject=None, raise_exception=False) |
|
Definition at line 122 of file Log.py.
◆ __init__()
def aestate.util.Log.ALog.__init__ |
( |
|
self, |
|
|
|
path, |
|
|
|
print_flag = False , |
|
|
|
save_flag = False , |
|
|
|
max_clear = 10 |
|
) |
| |
初始化配置
:param path:保存的路径
:param print_flag:是否打印日志 默认False
:param save_flag:是否保存日志 默认False
:param max_clear:日志储存最大限制,默认10MB 单位:MB
Definition at line 125 of file Log.py.
◆ __new__()
def aestate.util.Log.ALog.__new__ |
( |
|
cls, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
◆ error()
def aestate.util.Log.ALog.error |
( |
|
self, |
|
|
* |
content, |
|
|
** |
kwargs |
|
) |
| |
错误日志
:param content:内容
:return:
Definition at line 338 of file Log.py.
◆ format_text()
将字符串格式化成好看的颜色
Definition at line 155 of file Log.py.
◆ get_path()
def aestate.util.Log.ALog.get_path |
( |
|
self, |
|
|
|
end_path |
|
) |
| |
日志类获取绝对路径
:param end_path:
:return:
Definition at line 357 of file Log.py.
◆ info()
def aestate.util.Log.ALog.info |
( |
|
self, |
|
|
* |
content, |
|
|
** |
kwargs |
|
) |
| |
成功日志
:param content:内容
:return:
Definition at line 309 of file Log.py.
◆ log()
def aestate.util.Log.ALog.log |
( |
|
msg, |
|
|
|
obj = None , |
|
|
|
line = sys._getframe().f_back.f_lineno , |
|
|
|
task_name = 'TEXT' , |
|
|
|
LogObject = None , |
|
|
LogStatus |
field = LogStatus.Info , |
|
|
|
func = None , |
|
|
ConsoleColor.FontColor |
text_color = None , |
|
|
** |
kwargs |
|
) |
| |
|
static |
输出任务执行日志
:param msg:消息
:param obj:执行日志的对象地址
:param line:被调用前的行数
:param task_name:任务对象的值
:param LogObject:写出文件的对象
:param field:日志模式
:param func:日志执行后的自定义操作
Definition at line 194 of file Log.py.
◆ log_error()
def aestate.util.Log.ALog.log_error |
( |
|
msg, |
|
|
|
obj = None , |
|
|
|
line = sys._getframe().f_back.f_lineno , |
|
|
|
task_name = 'ERROR' , |
|
|
|
LogObject = None , |
|
|
|
raise_exception = False |
|
) |
| |
|
static |
:param msg:描述
:param line:行
:param obj:执行的对象,当允许抛出异常时,则指明该对象为一个Exception或他的子类
:param task_name:线程唯一名称
:param LogObject:日志对象
:param raise_exception:是否抛出异常
Definition at line 254 of file Log.py.
◆ log_util()
def aestate.util.Log.ALog.log_util |
( |
|
self, |
|
|
|
path_str, |
|
|
* |
content |
|
) |
| |
日志工具
:param path_str:
:param content:
:return:
Definition at line 346 of file Log.py.
◆ pure_log()
def aestate.util.Log.ALog.pure_log |
( |
|
msg, |
|
|
** |
kwargs |
|
) |
| |
|
static |
输出任务执行日志
:param msg:消息
Definition at line 145 of file Log.py.
◆ template()
def aestate.util.Log.ALog.template |
( |
|
self, |
|
|
LogStatus |
status, |
|
|
* |
content, |
|
|
** |
kwargs |
|
) |
| |
◆ warn()
def aestate.util.Log.ALog.warn |
( |
|
self, |
|
|
* |
content, |
|
|
** |
kwargs |
|
) |
| |
警告日志
:param content:内容
:return:
Definition at line 330 of file Log.py.
◆ warning()
def aestate.util.Log.ALog.warning |
( |
** |
kwargs | ) |
|
|
static |
◆ _instance_lock
aestate.util.Log.ALog._instance_lock = threading.RLock() |
|
staticprivate |
◆ max_clear
aestate.util.Log.ALog.max_clear |
◆ path
aestate.util.Log.ALog.path |
◆ print_flag
aestate.util.Log.ALog.print_flag |
◆ save_flag
aestate.util.Log.ALog.save_flag |
The documentation for this class was generated from the following file: