mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Remove debug logging
This commit is contained in:
@@ -272,8 +272,6 @@ func (e *UniversalExecutor) LaunchCmd(command *ExecCommand) (*ProcessState, erro
|
||||
return nil, err
|
||||
}
|
||||
|
||||
e.logger.Printf("[DEBUG] executor: XXX 1")
|
||||
|
||||
// Setup the loggers
|
||||
if err := e.configureLoggers(); err != nil {
|
||||
return nil, err
|
||||
@@ -281,27 +279,18 @@ func (e *UniversalExecutor) LaunchCmd(command *ExecCommand) (*ProcessState, erro
|
||||
e.cmd.Stdout = e.lro
|
||||
e.cmd.Stderr = e.lre
|
||||
|
||||
e.logger.Printf("[DEBUG] executor: XXX 2")
|
||||
|
||||
// Look up the binary path and make it executable
|
||||
absPath, err := e.lookupBin(e.ctx.TaskEnv.ReplaceEnv(command.Cmd))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
e.logger.Printf("[DEBUG] executor: XXX abs: %q", absPath)
|
||||
|
||||
if err := e.makeExecutable(absPath); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
path := absPath
|
||||
|
||||
e.logger.Printf("[DEBUG] executor: XXX cmd.Path=%q", path)
|
||||
e.logger.Printf("[DEBUG] executor: XXX cmd.Args=%q", e.cmd.Args)
|
||||
e.logger.Printf("[DEBUG] executor: XXX cmd.Dir= %q", e.cmd.Dir)
|
||||
e.logger.Printf("[DEBUG] executor: XXX cmd.Sys= %#v", e.cmd.SysProcAttr)
|
||||
|
||||
// Determine the path to run as it may have to be relative to the chroot.
|
||||
if e.fsIsolationEnforced {
|
||||
rel, err := filepath.Rel(e.ctx.TaskDir, path)
|
||||
@@ -316,11 +305,6 @@ func (e *UniversalExecutor) LaunchCmd(command *ExecCommand) (*ProcessState, erro
|
||||
e.cmd.Args = append([]string{e.cmd.Path}, e.ctx.TaskEnv.ParseAndReplace(command.Args)...)
|
||||
e.cmd.Env = e.ctx.TaskEnv.EnvList()
|
||||
|
||||
e.logger.Printf("[DEBUG] executor: XXX cmd.Path=%q", path)
|
||||
e.logger.Printf("[DEBUG] executor: XXX cmd.Args=%q", e.cmd.Args)
|
||||
e.logger.Printf("[DEBUG] executor: XXX cmd.Dir= %q", e.cmd.Dir)
|
||||
e.logger.Printf("[DEBUG] executor: XXX cmd.Sys= %#v", e.cmd.SysProcAttr)
|
||||
|
||||
// Start the process
|
||||
if err := e.cmd.Start(); err != nil {
|
||||
return nil, fmt.Errorf("failed to start command path=%q --- args=%q: %v", path, e.cmd.Args, err)
|
||||
@@ -336,9 +320,6 @@ func (e *UniversalExecutor) configureLoggers() error {
|
||||
e.rotatorLock.Lock()
|
||||
defer e.rotatorLock.Unlock()
|
||||
|
||||
e.logger.Printf("[DEBUG] executor: XXX logdir= %q", e.ctx.LogDir)
|
||||
e.logger.Printf("[DEBUG] executor: XXX task = %q", e.ctx.Task.Name)
|
||||
|
||||
logFileSize := int64(e.ctx.Task.LogConfig.MaxFileSizeMB * 1024 * 1024)
|
||||
if e.lro == nil {
|
||||
lro, err := logging.NewFileRotator(e.ctx.LogDir, fmt.Sprintf("%v.stdout", e.ctx.Task.Name),
|
||||
|
||||
Reference in New Issue
Block a user