mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-08 14:01:51 +00:00
Replace all rlog
occurrences with the shared logger (#350)
* Replace all `rlog` occurrences with the shared logger * Use the same log format in `InitLoggerStderrOnly` as well * Convert one more `log.Fatal` to `logger.Log.Errorf` as well in the `cli` * Replace `log.` occurrences with `logger.Log.` in `agent` * Fix `cannot use err (type error)` * Change the logging level to `DEBUG` * Replace an `Errorf` with `Fatal` * Add informative message
This commit is contained in:
@@ -28,3 +28,14 @@ func InitLogger(logPath string) {
|
||||
|
||||
logging.SetBackend(backend1Leveled, backend2Formatter)
|
||||
}
|
||||
|
||||
func InitLoggerStderrOnly() {
|
||||
consoleLog := logging.NewLogBackend(os.Stderr, "", 0)
|
||||
|
||||
backend1Formatter := logging.NewBackendFormatter(consoleLog, format)
|
||||
|
||||
backend1Leveled := logging.AddModuleLevel(consoleLog)
|
||||
backend1Leveled.SetLevel(logging.DEBUG, "")
|
||||
|
||||
logging.SetBackend(backend1Leveled, backend1Formatter)
|
||||
}
|
||||
|
Reference in New Issue
Block a user