MCPcopy Create free account
hub / github.com/LanceLRQ/deer-executor / NewSessionWithLog

Function NewSessionWithLog

executor/structs.go:96–104  ·  view source on GitHub ↗

NewSessionWithLog 创建一个包含日志的对象

(configFile string, print bool, level int)

Source from the content-addressed store, hash-verified

94
95// NewSessionWithLog 创建一个包含日志的对象
96func NewSessionWithLog(configFile string, print bool, level int) (*JudgeSession, error) {
97 session, err := NewSession(configFile)
98 if err != nil {
99 return nil, err
100 }
101 session.Logger.SetStdoutPrint(print)
102 session.Logger.SetLogLevel(level)
103 return session, nil
104}
105
106// Clean 清理会话工作目录
107func (session *JudgeSession) Clean() {

Callers 1

runOnceJudgeFunction · 0.92

Calls 3

NewSessionFunction · 0.85
SetStdoutPrintMethod · 0.80
SetLogLevelMethod · 0.80

Tested by

no test coverage detected