log management update 02
This commit is contained in:
parent
c6a2b89b29
commit
9730f143fc
|
@ -12,6 +12,7 @@ import sys
|
|||
from utils.ows_path import increment_path
|
||||
from utils.hotkeyjudge import hotkey_judge
|
||||
from utils.frame_opt import frame_opt
|
||||
from utils.log import log_management
|
||||
|
||||
|
||||
def parse_args(known=False):
|
||||
|
@ -54,13 +55,6 @@ def parse_args(known=False):
|
|||
return args
|
||||
|
||||
|
||||
# 日志管理
|
||||
def log_management(logContent, logName="test.log", logSaveMode="a"):
|
||||
ROOT_PATH = sys.path[0]
|
||||
logFile = open(f'{ROOT_PATH}/{logName}', logSaveMode)
|
||||
logFile.write(logContent)
|
||||
|
||||
|
||||
# Webcam OpenCV
|
||||
def webcam_opencv(device_index=0, quit_key="q", pause_key="p", is_autoSaveFrame=False, frame_saveDir="./WebcamFrame",
|
||||
frame_dirName="frames", frame_nSave=1, auto_frameNum=0, is_handSaveFrame=False, frame_capKey="a",
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# OpenCV Webcam Script v0.3
|
||||
# 创建人:曾逸夫
|
||||
# 创建时间:2022-01-14
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
# 日志管理
|
||||
def log_management(logContent, logName="test.log", logSaveMode="a"):
|
||||
ROOT_PATH = sys.path[0]
|
||||
logFile = open(f'{ROOT_PATH}/{logName}', logSaveMode)
|
||||
logFile.write(logContent)
|
Loading…
Reference in New Issue