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

Ensure JobActor has JobID as part of every emitted log line #384

Open
sundargates opened this issue Mar 29, 2023 · 1 comment
Open

Ensure JobActor has JobID as part of every emitted log line #384

sundargates opened this issue Mar 29, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@sundargates
Copy link
Collaborator

Context

We use the slf4j logger API to emit logs from within all the actors. All these actors have a unique way of identifying themselves. For instance, the JobActor represents an instance of a running Job with a unique JobID. Thus, it would be nice to ensure all the logs emitted from the JobActor contain this information. Today, this is done in an ad-hoc fashion. Some logs have the JobID, while others don't. It would be nice to develop a more structured way of solving this.

Goals

Look at the below line from JobActor.java to understand what the problem is.

LOGGER.info("Initializing Job {}", jobId);

We manually add the jobID in log line above. However, in other places, we fail to do this—for instance, look at the example below (also from JobActor.java).

LOGGER.info("Stored mantis job");

Instead, it would be nice to have a more structured way of solving this problem—something like the one below.

jobLogger.info("Whatever");

And the expectation is that jobLogger adds the jobID to every emitted logline by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants