master
ColdWindScholar 2023-09-30 08:53:07 +08:00
parent ce38a8a28e
commit 75cdf31cca
1 changed files with 21 additions and 0 deletions

21
log.py Normal file
View File

@ -0,0 +1,21 @@
from time import strftime
def LOG(info):
print('[%s] %s\n' % (strftime('%H:%M:%S'), info))
def LOGI(info):
print('[%s] \033[94m[INFO]\033[0m%s\n' % (strftime('%H:%M:%S'), info))
def LOGE(info):
print('[%s] \033[91m[ERROR]\033[0m%s\n' % (strftime('%H:%M:%S'), info))
def LOGW(info):
print('[%s] \033[93m[WARNING]\033[0m%s\n' % (strftime('%H:%M:%S'), info))
def LOGS(info):
print('[%s] \033[92m[SUCCESS]\033[0m%s\n' % (strftime('%H:%M:%S'), info))