You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
719 B
26 lines
719 B
from Util.Logger import *
|
|
|
|
import threading
|
|
|
|
|
|
# 后台线程用来跑midjourney的任务
|
|
def do_midjourmey():
|
|
log_mj.info("我是Midjourney的日志")
|
|
|
|
|
|
if __name__ == '__main__':
|
|
# 绘鸭的Stable Diffusion 日志文件
|
|
LOG_SD = Logger('../Log/HuiYa_SD.log', level='debug')
|
|
log_sd = LOG_SD.logger
|
|
# 绘鸭的Midjourney日志文件
|
|
LOG_MJ = Logger('../Log/HuiYa_MJ.log', level='debug')
|
|
log_mj = LOG_MJ.logger
|
|
|
|
# 创建后台线程执行日志记录
|
|
thread = threading.Thread(target=do_midjourmey)
|
|
thread.daemon = True # 设置为后台线程
|
|
thread.start()
|
|
|
|
# 主线程继续执行其他代码
|
|
log_sd.info("我是Stable Diffusion的日志")
|