Skip to content

Commit 2041cdc

Browse files
committed
Clean up logs
1 parent e26a8d5 commit 2041cdc

File tree

18 files changed

+8
-22
lines changed

18 files changed

+8
-22
lines changed

src/plugins/agent_api.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ func (a *AgentAPI) Close() {
191191
if err := a.server.Shutdown(context.Background()); err != nil {
192192
log.Errorf("Agent API HTTP Server Shutdown Error: %v", err)
193193
}
194+
log.Info("Agent API is closed")
194195
}
195196

196197
func (a *AgentAPI) Process(message *core.Message) {

src/plugins/commander.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ func (c *Commander) Init(pipeline core.MessagePipeInterface) {
4545
}
4646

4747
func (c *Commander) Close() {
48-
log.Info("Commander is wrapping up")
4948
log.Info("Commander is closed")
5049
}
5150

src/plugins/config_reader.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ func (r *ConfigReader) Info() *core.Info {
4646
}
4747

4848
func (r *ConfigReader) Close() {
49-
log.Info("ConfigReader is wrapping up")
5049
log.Info("ConfigReader is closed")
5150
}
5251

@@ -186,17 +185,17 @@ func (r *ConfigReader) deRegisterPlugin(data string) {
186185
if data == agent_config.FeatureFileWatcher {
187186
err := r.messagePipeline.DeRegister([]string{agent_config.FeatureFileWatcher, agent_config.FeatureFileWatcherThrottle})
188187
if err != nil {
189-
log.Warnf("Error De-registering %v Plugin: %v", data, err)
188+
log.Warnf("Error deregistering %v plugin: %v", data, err)
190189
}
191190
} else if data == agent_config.FeatureMetrics {
192191
err := r.messagePipeline.DeRegister([]string{agent_config.FeatureMetrics, agent_config.FeatureMetricsThrottle, agent_config.FeatureMetricsSender})
193192
if err != nil {
194-
log.Warnf("Error De-registering %v Plugin: %v", data, err)
193+
log.Warnf("Error deregistering %v plugin: %v", data, err)
195194
}
196195
} else {
197196
err := r.messagePipeline.DeRegister([]string{data})
198197
if err != nil {
199-
log.Warnf("Error De-registering %v Plugin: %v", data, err)
198+
log.Warnf("Error deregistering %v plugin: %v", data, err)
200199
}
201200
}
202201
}

src/plugins/events.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ func (a *Events) Init(pipeline core.MessagePipeInterface) {
6363
}
6464

6565
func (a *Events) Close() {
66-
log.Info("Events is wrapping up")
6766
log.Info("Events is closed")
6867
}
6968

src/plugins/extensions.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ func (e *Extensions) Init(pipeline core.MessagePipeInterface) {
3636
}
3737

3838
func (e *Extensions) Close() {
39-
log.Info("Extensions is wrapping up")
4039
log.Info("Extensions is closed")
4140
}
4241

src/plugins/features.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ func (f *Features) Init(pipeline core.MessagePipeInterface) {
9797
}
9898

9999
func (f *Features) Close() {
100-
log.Info("Features is wrapping up")
101100
log.Info("Features is closed")
102101
}
103102

src/plugins/file_watcher_throttling.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ func (fwt *FileWatchThrottle) Init(pipeline core.MessagePipeInterface) {
6464
}
6565

6666
func (fwt *FileWatchThrottle) Close() {
67-
log.Info("FileWatchThrottle is wrapping up")
6867
log.Info("FileWatchThrottle is closed")
6968
}
7069

src/plugins/nginx.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,6 @@ func (n *Nginx) Info() *core.Info {
719719

720720
// Close cleans up anything outstanding once the plugin ends
721721
func (n *Nginx) Close() {
722-
log.Info("NginxBinary is wrapping up")
723722
log.Info("NginxBinary is closed")
724723
}
725724

src/plugins/registration.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ func (r *OneTimeRegistration) Init(pipeline core.MessagePipeInterface) {
7777
}
7878

7979
func (r *OneTimeRegistration) Close() {
80-
log.Info("OneTimeRegistration is wrapping up")
8180
log.Info("OneTimeRegistration is closed")
8281
}
8382

test/performance/vendor/github.com/nginx/agent/v2/src/plugins/agent_api.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)