net.dontdrinkandroot.utils.oldprogressmonitor.impl

## Class LogMonitor

- java.lang.Object
- - net.dontdrinkandroot.utils.oldprogressmonitor.impl.AbstractProgressMonitor
  - - net.dontdrinkandroot.utils.oldprogressmonitor.impl.LogMonitor

All Implemented Interfaces:
  Serializable, ProgressMonitor

    public class LogMonitor
    extends AbstractProgressMonitor

A `ProgressMonitor` that outputs the progress to a `Logger`. A suppress duration specifies how long new updates are not logged. The log level is 'info'.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`LogMonitor()` Construct a LogMonitor with the `Logger` corresponding to this class and Log `Level` info.

### Method Summary

Methods
`protected void` `doMessageChanged()` Hook that is invoked after the message has changed.
`protected void` `doProgressChanged()` Hook that is invoked after the progress has changed.
`org.slf4j.Logger` `getLogger()` Get the logger to log to.
`long` `getSuppressDuration()` Get current suppress duration.
`void` `setLogger(org.slf4j.Logger logger)` Set the logger to log to.
`void` `setSuppressDuration(long suppressDuration)` Set current suppress duration.

### Methods inherited from class net.dontdrinkandroot.utils.oldprogressmonitor.impl.AbstractProgressMonitor

`getMessage, getProgress, getProgressStatus, getRangeEnd, getRangeStart, isDone, setDone, setMessage, setProgress, setRange`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LogMonitor

    public LogMonitor()

Construct a LogMonitor with the `Logger` corresponding to this class and Log `Level` info. Default suppress duration is 0.

### Method Detail

#### doMessageChanged

    protected final void doMessageChanged()

Description copied from class: `AbstractProgressMonitor`
Hook that is invoked after the message has changed.

Overrides:
  `doMessageChanged` in class `AbstractProgressMonitor`

#### doProgressChanged

    protected final void doProgressChanged()

Description copied from class: `AbstractProgressMonitor`
Hook that is invoked after the progress has changed.

Overrides:
  `doProgressChanged` in class `AbstractProgressMonitor`

#### setLogger

    public final void setLogger(org.slf4j.Logger logger)

Set the logger to log to.

Parameters:
  `logger` - The logger to log to.

#### getLogger

    public final org.slf4j.Logger getLogger()

Get the logger to log to.

Returns:
  The logger to log to.

#### getSuppressDuration

    public final long getSuppressDuration()

Get current suppress duration.

Returns:
  Current suppress duration.

#### setSuppressDuration

    public final void setSuppressDuration(long suppressDuration)

Set current suppress duration.

Parameters:
  `suppressDuration` - Current suppress duration.