Package com.ocient.util

# Class ReportLogger

java.lang.Object
com.ocient.util.ReportLogger

public final class ReportLogger extends Object
Utility class for periodically logging JSON documents

## Constructor Summary

Constructors
Constructor
Description
`ReportLogger(ScheduledExecutorService executorService, Consumer<org.apache.logging.log4j.Logger> onReport)`
Creates a `ReportLogger` instance with the following `RollingFileAppender` defaults.

## Method Summary

Modifier and Type
Method
Description
`void`
`addRollingFileAppender(org.apache.logging.log4j.core.appender.RollingFileAppender rfa)`
`void`
`configure(int intervalInSeconds)`
`String`
`generateRandomString()`
`Stream<String>`
`getAppenderFileNames()`
`String`
`getMetricsFilePath(String directory, String filename)`
`String`
`getMetricsFilePattern(String directory, String filename)`
`boolean`
`isRunning()`
`void`
`removeAllFileAppenders()`
`void`
`stop()`
`void`
`validateDirectoryAndFilename(String directory, String filename)`

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

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

## Constructor Details

### ReportLogger

public ReportLogger(ScheduledExecutorService executorService, Consumer<org.apache.logging.log4j.Logger> onReport)
Creates a `ReportLogger` instance with the following `RollingFileAppender` defaults.

Parameters:
  `executorService` -
  `onReport` -
  `defaultFlieName` -
  `defaultFilePattern` -
  `defaultLogInterval` -

## Method Details

### getAppenderFileNames

public Stream<String> getAppenderFileNames()

### configure

public void configure(int intervalInSeconds)

### stop

public void stop()

### isRunning

public boolean isRunning()

### removeAllFileAppenders

public void removeAllFileAppenders()

### addRollingFileAppender

public void addRollingFileAppender(org.apache.logging.log4j.core.appender.RollingFileAppender rfa)

### validateDirectoryAndFilename

public void validateDirectoryAndFilename(String directory, String filename)

### getMetricsFilePath

public String getMetricsFilePath(String directory, String filename)

### getMetricsFilePattern

public String getMetricsFilePattern(String directory, String filename)

### generateRandomString

public String generateRandomString()