fix(libscan): delete map that keeps all file contents detected by FindLock to save memory (#1556)

* fix(libscan): delete Map that keeps all files detected by FindLock to save memory

* continue analyzing libs if err occurred

* FindLockDirs

* fix

* fix
This commit is contained in:
Kota Kanbe
2022-11-10 10:19:15 +09:00
committed by GitHub
parent 96333f38c9
commit 1d97e91341
6 changed files with 134 additions and 119 deletions

View File

@@ -45,6 +45,13 @@ func NewNormalLogger() Logger {
return Logger{Entry: logrus.Entry{Logger: logrus.New()}}
}
// NewNormalLogger creates normal logger
func NewIODiscardLogger() Logger {
l := logrus.New()
l.Out = io.Discard
return Logger{Entry: logrus.Entry{Logger: l}}
}
// NewCustomLogger creates logrus
func NewCustomLogger(debug, quiet, logToFile bool, logDir, logMsgAnsiColor, serverName string) Logger {
log := logrus.New()