mirror of
https://github.com/lorsanstand/HomeOps-Hub.git
synced 2026-06-19 17:45:17 +03:00
refactor: add agent name in logger
This commit is contained in:
@@ -33,6 +33,7 @@ func NewApp() (*App, error) {
|
||||
|
||||
logger := log.NewLogger(cfg)
|
||||
logger = logger.With().Str("component", "internal.app").Logger()
|
||||
logger = logger.With().Str("name", cfg.AppName).Logger()
|
||||
|
||||
sett, err := settings.ReadSettings(cfg.SettingsPath)
|
||||
if err != nil {
|
||||
|
||||
@@ -65,7 +65,7 @@ func (a *AgentService) RegisterAgentConn(ctx context.Context) error {
|
||||
if err = a.settings.InsertAgentID(data.AgentID); err != nil {
|
||||
return fmt.Errorf("save agent ID: %w", err)
|
||||
}
|
||||
a.log.Info().Str("AgentID", data.AgentID).Msg("agent registration end")
|
||||
a.log.Info().Str("agentID", data.AgentID).Msg("agent registration end")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user