fix(t233): add redacted ERP diagnostics
This commit is contained in:
@@ -237,12 +237,20 @@ func buildRouter(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var erpDiagnosticLogger shunyunbao.DiagnosticLogger
|
||||
if cfg.ERPDebugLog {
|
||||
log.Print("ERP diagnostic logging enabled; response summaries are redacted")
|
||||
erpDiagnosticLogger = func(event string) {
|
||||
log.Print(event)
|
||||
}
|
||||
}
|
||||
erpSession, err := shunyunbao.NewSessionManager(shunyunbao.SessionConfig{
|
||||
BaseURL: cfg.ShunyunbaoURL,
|
||||
Username: cfg.ShunyunbaoUsername,
|
||||
Password: cfg.ShunyunbaoPassword,
|
||||
Timeout: cfg.ShunyunbaoTimeout,
|
||||
CaptchaRecognizer: ocr,
|
||||
DiagnosticLogger: erpDiagnosticLogger,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user