tiny: print task name and error message for the SaveState error in task_runner

This commit is contained in:
Kenjiro Nakayama
2016-08-07 13:33:58 +09:00
parent f847db6d5d
commit 32ce8939c7

View File

@@ -212,7 +212,7 @@ func (r *TaskRunner) DestroyState() error {
func (r *TaskRunner) setState(state string, event *structs.TaskEvent) {
// Persist our state to disk.
if err := r.SaveState(); err != nil {
r.logger.Printf("[ERR] client: failed to save state of Task Runner: %v", r.task.Name)
r.logger.Printf("[ERR] client: failed to save state of Task Runner for task %q: %v", r.task.Name, err)
}
// Indicate the task has been updated.