Class ProgressBarLogger
java.lang.Object
com.shaft.tools.io.internal.ProgressBarLogger
- All Implemented Interfaces:
AutoCloseable
Logs a lightweight terminal progress bar for long-running synchronous operations.
The progress bar runs on a virtual thread and is automatically closed when the operation
completes via try-with-resources. ANSI styling is disabled in non-interactive runs and when
cucumber.ansi-colors.disabled=true to keep CI logs readable.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProgressBarLogger(String taskName) Creates a new progress bar logger using the default element identification timeout.ProgressBarLogger(String taskName, int timeoutVal) Creates a new progress bar logger with a custom timeout. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Stops the background progress task and closes the progress bar stream.
-
Constructor Details
-
ProgressBarLogger
Creates a new progress bar logger using the default element identification timeout.- Parameters:
taskName- user-friendly task label shown beside the progress bar
-
ProgressBarLogger
Creates a new progress bar logger with a custom timeout.- Parameters:
taskName- user-friendly task label shown beside the progress bartimeoutVal- timeout in seconds used as the progress maximum
-
-
Method Details
-
close
public void close()Stops the background progress task and closes the progress bar stream.- Specified by:
closein interfaceAutoCloseable
-