client: standardize error logging format

This commit is contained in:
Alex Dadgar
2016-02-24 15:57:58 -08:00
parent 7f4140758e
commit 207d544a55
8 changed files with 22 additions and 22 deletions

View File

@@ -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
}