add embeddable scanner SDK

This commit is contained in:
ZacharyZcR
2026-05-18 14:41:15 +08:00
parent bce0a718ea
commit 6bfa05cb45
8 changed files with 515 additions and 2 deletions
+10
View File
@@ -88,3 +88,13 @@ func CloseLogger() {
globalLogger.Close()
}
}
// ResetLogger clears the process-wide logger so embedded callers can rebuild it
// after replacing runtime configuration.
func ResetLogger() {
if globalLogger != nil {
globalLogger.Close()
}
globalLogger = nil
loggerOnce = sync.Once{}
}