Documentation ¶
Index ¶
- Constants
- func CleanAndLoadOnceLogs()
- func DeleteDebugFile() error
- func GetLogger4Tester() *logrus.Logger
- func GetOnceLog4Running() *log_hub.OnceLog
- func GetSpiltOnceLog(log *log_hub.OnceLog) []*log_hub.OnceLog
- func NewLogHelper(appName string, logStorePath string, level logrus.Level, maxAge time.Duration, ...) *logrus.Logger
- func WriteDebugFile() error
- type LoggerHub
Constants ¶
View Source
const ( OnceSubsScanStart = "OneTimeSubtitleScanStart" OnceSubsScanEnd = "OneTimeSubtitleScanEnd" )
View Source
const ( LogNameChineseSubFinder = "ChineseSubFinder" LogNameGetCAPTCHA = "GetCAPTCHA" LogNameBackEnd = "BackEnd" LogNameCliSubTimelineFixer = "SubTimelineFixer" )
View Source
const DebugFileName = "opendebuglog"
Variables ¶
This section is empty.
Functions ¶
func CleanAndLoadOnceLogs ¶
func CleanAndLoadOnceLogs()
CleanAndLoadOnceLogs 调用的时机,一定是要在新开一个日志前,且把上一个日志的文件流关闭的时候
func GetLogger4Tester ¶
func GetSpiltOnceLog ¶
GetSpiltOnceLog 拆分到一行一个,没有锁,所以需要考虑并发问题
func NewLogHelper ¶
func WriteDebugFile ¶
func WriteDebugFile() error
WriteDebugFile 写入开启 Debug 级别日志记录的特殊文件,注意这个最好是在主程序中调用,这样就跟主程序在一个目录下生成,log 去检测是否存在才有意义
Types ¶
Click to show internal directories.
Click to hide internal directories.