Class JobStartStopLogger
Object
org.anchoranalysis.experiment.task.processor.JobStartStopLogger
public class JobStartStopLogger extends Object
Logs events when jobs start and stop, with or without errors.
The class is thread-safe as there might be multiple calls in parallel.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description JobStartStopLogger(String jobDescriptionText, ConcurrentJobMonitor monitor, boolean showHashSeperators, int showOngoingJobsLessThan, Optional<MessageLogger> logger)Creates a job-logger. -
Method Summary
Modifier and Type Method Description voidlogEnd(JobDescription job, JobStateMonitor monitor)Performs logging for when a job ends.voidlogStart(JobDescription job)Performs logging for when a job starts.
-
Constructor Details
-
JobStartStopLogger
public JobStartStopLogger(String jobDescriptionText, ConcurrentJobMonitor monitor, boolean showHashSeperators, int showOngoingJobsLessThan, Optional<MessageLogger> logger)Creates a job-logger.- Parameters:
jobDescriptionText- a noun describing the job that appears in the log e.g. "Job"monitor- monitors the progress of jobs.showHashSeperators- indicates if lines of hashes should be placed before and after each log message (adds emphasis).showOngoingJobsLessThan- When the number of ongoing jobs is less than this threshold, they are shown in event logs. 0 disables.logger- write messages to logger, if defined.
-
-
Method Details