mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 08:48:32 +02:00
refactor(monitor): include detail in service down notification log
This commit is contained in:
@@ -295,7 +295,7 @@ func (mon *monitor) notifyServiceUp(logger *zerolog.Logger, result *types.Health
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (mon *monitor) notifyServiceDown(logger *zerolog.Logger, result *types.HealthCheckResult) {
|
func (mon *monitor) notifyServiceDown(logger *zerolog.Logger, result *types.HealthCheckResult) {
|
||||||
logger.Warn().Msg("service went down")
|
logger.Warn().Str("detail", result.Detail).Msg("service went down")
|
||||||
extras := mon.buildNotificationExtras(result)
|
extras := mon.buildNotificationExtras(result)
|
||||||
extras.Add("Last Seen", strutils.FormatLastSeen(GetLastSeen(mon.service)))
|
extras.Add("Last Seen", strutils.FormatLastSeen(GetLastSeen(mon.service)))
|
||||||
mon.notifyFunc(¬if.LogMessage{
|
mon.notifyFunc(¬if.LogMessage{
|
||||||
|
|||||||
Reference in New Issue
Block a user