log: Add logger.Event to send to console and other logger targets (#19060)
Add a new function logger.Event() to send the log to Console and http/kafka log webhooks. This will include some internal events such as disk healing and rebalance/decommissioning
This commit is contained in:
@@ -478,7 +478,7 @@ func bootstrapTraceMsg(msg string) {
|
||||
globalBootstrapTracer.Record(info)
|
||||
|
||||
if serverDebugLog {
|
||||
logger.Info(fmt.Sprint(time.Now().Round(time.Millisecond).Format(time.RFC3339), " bootstrap: ", msg))
|
||||
fmt.Println(time.Now().Round(time.Millisecond).Format(time.RFC3339), " bootstrap: ", msg)
|
||||
}
|
||||
|
||||
noSubs := globalTrace.NumSubscribers(madmin.TraceBootstrap) == 0
|
||||
@@ -491,7 +491,7 @@ func bootstrapTraceMsg(msg string) {
|
||||
|
||||
func bootstrapTrace(msg string, worker func()) {
|
||||
if serverDebugLog {
|
||||
logger.Info(fmt.Sprint(time.Now().Round(time.Millisecond).Format(time.RFC3339), " bootstrap: ", msg))
|
||||
fmt.Println(time.Now().Round(time.Millisecond).Format(time.RFC3339), " bootstrap: ", msg)
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
@@ -1031,8 +1031,8 @@ func serverMain(ctx *cli.Context) {
|
||||
globalMinioClient.SetAppInfo("minio-perf-test", ReleaseTag)
|
||||
|
||||
if serverDebugLog {
|
||||
logger.Info("== DEBUG Mode enabled ==")
|
||||
logger.Info("Currently set environment settings:")
|
||||
fmt.Println("== DEBUG Mode enabled ==")
|
||||
fmt.Println("Currently set environment settings:")
|
||||
ks := []string{
|
||||
config.EnvAccessKey,
|
||||
config.EnvSecretKey,
|
||||
@@ -1044,9 +1044,9 @@ func serverMain(ctx *cli.Context) {
|
||||
if slices.Contains(ks, strings.Split(v, "=")[0]) {
|
||||
continue
|
||||
}
|
||||
logger.Info(v)
|
||||
fmt.Println(v)
|
||||
}
|
||||
logger.Info("======")
|
||||
fmt.Println("======")
|
||||
}
|
||||
|
||||
daemon.SdNotify(false, daemon.SdNotifyReady)
|
||||
|
||||
Reference in New Issue
Block a user