mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 14:35:00 +00:00
chore(p2p): enhance logging (#4090)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
06d0d00231
commit
20a5b20b59
2 changed files with 27 additions and 8 deletions
19
core/p2p/p2p_common.go
Normal file
19
core/p2p/p2p_common.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package p2p
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var logLevel = strings.ToLower(os.Getenv("LOCALAI_P2P_LOGLEVEL"))
|
||||
|
||||
const (
|
||||
logLevelDebug = "debug"
|
||||
logLevelInfo = "info"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if logLevel == "" {
|
||||
logLevel = logLevelInfo
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue