mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
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:
@@ -469,7 +469,7 @@ func (c *Client) MarkOffline(err error) bool {
|
||||
if atomic.CompareAndSwapInt32(&c.connected, offline, online) {
|
||||
now := time.Now()
|
||||
disconnected := now.Sub(c.LastConn())
|
||||
logger.Info("Client '%s' re-connected in %s", c.url.String(), disconnected)
|
||||
logger.Event(context.Background(), "Client '%s' re-connected in %s", c.url.String(), disconnected)
|
||||
atomic.StoreInt64(&c.lastConn, now.UnixNano())
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user