mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-08 03:55:11 +08:00
TUN-3471: Add structured log context to logs
This commit is contained in:
committed by
Arég Harutyunyan
parent
abab78730d
commit
55bf904689
@@ -99,7 +99,7 @@ func readConfigFromPath(configPath string, log *zerolog.Logger) (Root, error) {
|
||||
func (m *FileManager) WatcherItemDidChange(filepath string) {
|
||||
config, err := m.GetConfig()
|
||||
if err != nil {
|
||||
m.log.Error().Msgf("Failed to read new config: %s", err)
|
||||
m.log.Err(err).Msg("Failed to read new config")
|
||||
return
|
||||
}
|
||||
m.log.Info().Msg("Config file has been updated")
|
||||
@@ -108,5 +108,5 @@ func (m *FileManager) WatcherItemDidChange(filepath string) {
|
||||
|
||||
// WatcherDidError notifies of errors with the file watcher
|
||||
func (m *FileManager) WatcherDidError(err error) {
|
||||
m.log.Error().Msgf("Config watcher encountered an error: %s", err)
|
||||
m.log.Err(err).Msg("Config watcher encountered an error")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user