Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log Task ID in log messages on task creation / update / scheduling / processing #3384

Closed
vrindanayak opened this issue Sep 27, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@vrindanayak
Copy link
Member

Current Task.toString()

@Override
    public String toString() {
        return "Task{" +
                "deviceName='" + deviceName + '\'' +
                ", queueName='" + queueName + '\'' +
                ", type=" + type +
                ", status=" + status +
                ", scheduledTime=" + scheduledTime +
                ", numberOfFailures=" + numberOfFailures +
                '}';
    }

Change to

@Override
    public String toString() {
        return "Task{" +
                "taskID='" + pk + '\'' +
                "deviceName='" + deviceName + '\'' +
                ", queueName='" + queueName + '\'' +
                ", type=" + type +
                ", status=" + status +
                ", scheduledTime=" + scheduledTime +
                ", numberOfFailures=" + numberOfFailures +
                '}';
    }

Rationale : Helps in debugging and matching log info messages concerning tasks creation / scheduling / processing

@vrindanayak vrindanayak added the enhancement New feature or request label Sep 27, 2021
@vrindanayak vrindanayak added this to the 5.24.2 milestone Sep 27, 2021
@vrindanayak vrindanayak self-assigned this Sep 27, 2021
vrindanayak added a commit that referenced this issue Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant