This commit is contained in:
2025-04-15 01:40:50 +03:00
parent 240ee852c8
commit 35982a0ae7
2 changed files with 8 additions and 7 deletions

View File

@ -57,11 +57,15 @@ func (a *HCLoggerAdapter) Log(level hclog.Level, msg string, args ...interface{}
}
}
/*
* Start ugly hacks
*/
// Start ugly hacks
// Ignore exit messages
// - https://github.com/hashicorp/go-plugin/issues/331
// - https://github.com/hashicorp/go-plugin/issues/203
// - https://github.com/hashicorp/go-plugin/issues/192
var chLogLevel chLog.Level
if msg == "plugin process exited" || strings.HasPrefix(msg, "[DEBUG] plugin") {
if msg == "plugin process exited" ||
msg == "[ERR] plugin: stream copy 'stderr' error: stream closed" ||
strings.HasPrefix(msg, "[DEBUG] plugin") {
chLogLevel = chLog.DebugLevel
} else {
chLogLevel = hclogLevelTochLog(level)