diff --git a/client/driver/exec.go b/client/driver/exec.go index 946410e1f..1fe7642d0 100644 --- a/client/driver/exec.go +++ b/client/driver/exec.go @@ -170,7 +170,7 @@ func (d *ExecDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, erro if err != nil { merrs := new(multierror.Error) merrs.Errors = append(merrs.Errors, err) - d.logger.Println("[ERROR] driver.exec: error connecting to plugin so destroying plugin pid and user pid") + d.logger.Println("[ERR] driver.exec: error connecting to plugin so destroying plugin pid and user pid") if e := destroyPlugin(id.PluginConfig.Pid, id.UserPid); e != nil { merrs.Errors = append(merrs.Errors, fmt.Errorf("error destroying plugin and userpid: %v", e)) } @@ -265,11 +265,11 @@ func (h *execHandle) run() { if ps.ExitCode == 0 && err != nil { if h.isolationConfig != nil { if e := executor.DestroyCgroup(h.isolationConfig.Cgroup); e != nil { - h.logger.Printf("[ERROR] driver.exec: destroying cgroup failed while killing cgroup: %v", e) + h.logger.Printf("[ERR] driver.exec: destroying cgroup failed while killing cgroup: %v", e) } } if e := h.allocDir.UnmountAll(); e != nil { - h.logger.Printf("[ERROR] driver.exec: unmounting dev,proc and alloc dirs failed: %v", e) + h.logger.Printf("[ERR] driver.exec: unmounting dev,proc and alloc dirs failed: %v", e) } } h.waitCh <- &cstructs.WaitResult{ExitCode: ps.ExitCode, Signal: 0, diff --git a/client/driver/executor/executor.go b/client/driver/executor/executor.go index 47c33bf4b..a617416c5 100644 --- a/client/driver/executor/executor.go +++ b/client/driver/executor/executor.go @@ -230,7 +230,7 @@ func (e *UniversalExecutor) Exit() error { if e.cmd.Process != nil { proc, err := os.FindProcess(e.cmd.Process.Pid) if err != nil { - e.logger.Printf("[ERROR] executor: can't find process with pid: %v, err: %v", + e.logger.Printf("[ERR] executor: can't find process with pid: %v, err: %v", e.cmd.Process.Pid, err) } else if err := proc.Kill(); err != nil && err.Error() != finishedErr { merr.Errors = append(merr.Errors, diff --git a/client/driver/executor/executor_linux.go b/client/driver/executor/executor_linux.go index d156736f4..b86ae5f7f 100644 --- a/client/driver/executor/executor_linux.go +++ b/client/driver/executor/executor_linux.go @@ -47,10 +47,10 @@ func (e *UniversalExecutor) configureIsolation() error { } if err := e.applyLimits(os.Getpid()); err != nil { if er := DestroyCgroup(e.groups); er != nil { - e.logger.Printf("[ERROR] executor: error destroying cgroup: %v", er) + e.logger.Printf("[ERR] executor: error destroying cgroup: %v", er) } if er := e.removeChrootMounts(); er != nil { - e.logger.Printf("[ERROR] executor: error removing chroot: %v", er) + e.logger.Printf("[ERR] executor: error removing chroot: %v", er) } return fmt.Errorf("error entering the plugin process in the cgroup: %v:", err) } @@ -67,9 +67,9 @@ func (e *UniversalExecutor) applyLimits(pid int) error { // Entering the process in the cgroup manager := getCgroupManager(e.groups) if err := manager.Apply(pid); err != nil { - e.logger.Printf("[ERROR] executor: unable to join cgroup: %v", err) + e.logger.Printf("[ERR] executor: unable to join cgroup: %v", err) if err := e.Exit(); err != nil { - e.logger.Printf("[ERROR] executor: unable to kill process: %v", err) + e.logger.Printf("[ERR] executor: unable to kill process: %v", err) } return err } diff --git a/client/driver/java.go b/client/driver/java.go index 092effd2c..efab1e170 100644 --- a/client/driver/java.go +++ b/client/driver/java.go @@ -227,7 +227,7 @@ func (d *JavaDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, erro if err != nil { merrs := new(multierror.Error) merrs.Errors = append(merrs.Errors, err) - d.logger.Println("[ERROR] driver.java: error connecting to plugin so destroying plugin pid and user pid") + d.logger.Println("[ERR] driver.java: error connecting to plugin so destroying plugin pid and user pid") if e := destroyPlugin(id.PluginConfig.Pid, id.UserPid); e != nil { merrs.Errors = append(merrs.Errors, fmt.Errorf("error destroying plugin and userpid: %v", e)) } @@ -320,15 +320,15 @@ func (h *javaHandle) run() { if ps.ExitCode == 0 && err != nil { if h.isolationConfig != nil { if e := executor.DestroyCgroup(h.isolationConfig.Cgroup); e != nil { - h.logger.Printf("[ERROR] driver.java: destroying cgroup failed while killing cgroup: %v", e) + h.logger.Printf("[ERR] driver.java: destroying cgroup failed while killing cgroup: %v", e) } } else { if e := killProcess(h.userPid); e != nil { - h.logger.Printf("[ERROR] driver.java: error killing user process: %v", e) + h.logger.Printf("[ERR] driver.java: error killing user process: %v", e) } } if e := h.allocDir.UnmountAll(); e != nil { - h.logger.Printf("[ERROR] driver.java: unmounting dev,proc and alloc dirs failed: %v", e) + h.logger.Printf("[ERR] driver.java: unmounting dev,proc and alloc dirs failed: %v", e) } } h.waitCh <- &cstructs.WaitResult{ExitCode: ps.ExitCode, Signal: 0, Err: err} diff --git a/client/driver/logging/syslog_server.go b/client/driver/logging/syslog_server.go index 55bbe88ae..301f22f05 100644 --- a/client/driver/logging/syslog_server.go +++ b/client/driver/logging/syslog_server.go @@ -40,7 +40,7 @@ func (s *SyslogServer) Start() { default: connection, err := s.listener.Accept() if err != nil { - s.logger.Printf("[ERROR] logcollector.server: error in accepting connection: %v", err) + s.logger.Printf("[ERR] logcollector.server: error in accepting connection: %v", err) continue } go s.read(connection) diff --git a/client/driver/qemu.go b/client/driver/qemu.go index fbff86013..9dda2feea 100644 --- a/client/driver/qemu.go +++ b/client/driver/qemu.go @@ -252,9 +252,9 @@ func (d *QemuDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, erro executor, pluginClient, err := createExecutor(pluginConfig, d.config.LogOutput, d.config) if err != nil { - d.logger.Println("[ERROR] driver.qemu: error connecting to plugin so destroying plugin pid and user pid") + d.logger.Println("[ERR] driver.qemu: error connecting to plugin so destroying plugin pid and user pid") if e := destroyPlugin(id.PluginConfig.Pid, id.UserPid); e != nil { - d.logger.Printf("[ERROR] driver.qemu: error destroying plugin and userpid: %v", e) + d.logger.Printf("[ERR] driver.qemu: error destroying plugin and userpid: %v", e) } return nil, fmt.Errorf("error connecting to plugin: %v", err) } @@ -331,10 +331,10 @@ func (h *qemuHandle) run() { ps, err := h.executor.Wait() if ps.ExitCode == 0 && err != nil { if e := killProcess(h.userPid); e != nil { - h.logger.Printf("[ERROR] driver.qemu: error killing user process: %v", e) + h.logger.Printf("[ERR] driver.qemu: error killing user process: %v", e) } if e := h.allocDir.UnmountAll(); e != nil { - h.logger.Printf("[ERROR] driver.qemu: unmounting dev,proc and alloc dirs failed: %v", e) + h.logger.Printf("[ERR] driver.qemu: unmounting dev,proc and alloc dirs failed: %v", e) } } close(h.doneCh) diff --git a/client/driver/raw_exec.go b/client/driver/raw_exec.go index 2b4766584..0938a4645 100644 --- a/client/driver/raw_exec.go +++ b/client/driver/raw_exec.go @@ -156,9 +156,9 @@ func (d *RawExecDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, e } executor, pluginClient, err := createExecutor(pluginConfig, d.config.LogOutput, d.config) if err != nil { - d.logger.Println("[ERROR] driver.raw_exec: error connecting to plugin so destroying plugin pid and user pid") + d.logger.Println("[ERR] driver.raw_exec: error connecting to plugin so destroying plugin pid and user pid") if e := destroyPlugin(id.PluginConfig.Pid, id.UserPid); e != nil { - d.logger.Printf("[ERROR] driver.raw_exec: error destroying plugin and userpid: %v", e) + d.logger.Printf("[ERR] driver.raw_exec: error destroying plugin and userpid: %v", e) } return nil, fmt.Errorf("error connecting to plugin: %v", err) } @@ -234,10 +234,10 @@ func (h *rawExecHandle) run() { close(h.doneCh) if ps.ExitCode == 0 && err != nil { if e := killProcess(h.userPid); e != nil { - h.logger.Printf("[ERROR] driver.raw_exec: error killing user process: %v", e) + h.logger.Printf("[ERR] driver.raw_exec: error killing user process: %v", e) } if e := h.allocDir.UnmountAll(); e != nil { - h.logger.Printf("[ERROR] driver.raw_exec: unmounting dev,proc and alloc dirs failed: %v", e) + h.logger.Printf("[ERR] driver.raw_exec: unmounting dev,proc and alloc dirs failed: %v", e) } } h.waitCh <- &cstructs.WaitResult{ExitCode: ps.ExitCode, Signal: 0, Err: err} diff --git a/command/agent/command.go b/command/agent/command.go index f87560fcb..9bb4c08fc 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -652,7 +652,7 @@ func (c *Command) retryJoin(config *Config) { attempt++ if config.Server.RetryMaxAttempts > 0 && attempt > config.Server.RetryMaxAttempts { - logger.Printf("[ERROR] agent: max join retry exhausted, exiting") + logger.Printf("[ERR] agent: max join retry exhausted, exiting") close(c.retryJoinErrCh) return }