Skip to content

Package io.github.qishr.cascara.common.diagnostic.report

Class GlobalReporter

java.lang.Object
        io.github.qishr.cascara.common.diagnostic.report.AbstractReporter<io.github.qishr.cascara.common.diagnostic.report.GlobalReporter>
                io.github.qishr.cascara.common.diagnostic.report.GlobalReporter


public class GlobalReporter
extends AbstractReporter<GlobalReporter>

Field Summary

Modifier and Type Field Description
public static final String SERIALIZATION_FORMAT

Method Summary

Modifier and Type Method Description
public static void configureSerializer()
protected GlobalReporter self()
public static GlobalReporter globalInstance()
public static GlobalReporter forClass(Class<?> clazz) Gets a GlobalReporter instance for the specifie class.
public static GlobalReporter forSource(String fqcn) Gets a GlobalReporter instance for the specifie class.
public GlobalReporter setLevel(Level level) Sets the level of output when logging directly to the console.
public GlobalReporter setLevel(String fqcn, Level level) Sets the reporting level for the specified class.
public GlobalReporter setLevelInternal(String fqcn, Level level)
public GlobalReporter setLevels(Properties properties)
public GlobalReporter setDiagnosticConsumer(Consumer<Diagnostic> collector)
public GlobalReporter setProblemConsumer(Consumer<Diagnostic> collector)
public GlobalReporter setSystemOutputEnabled(boolean b)
public GlobalReporter setImmediateFlushEnabled(boolean b)
protected Consumer<Diagnostic> getDiagnosticConsumer()
protected Consumer<Diagnostic> getProblemConsumer()
protected boolean isSystemOutputEnabled()
protected boolean isImmediateFlushEnabled()
public void closeIpc()
public void report(Diagnostic diagnostic) Central reporting method.
protected void logLine(Level level, String msgLine)

Methods inherited from AbstractReporter

warn, trace, setStackTraceEnabled, warnAt, setPrefixEveryLine, setShowProblemCodes, reportsDebug, errorAt, debug, reportsTrace, collectsProblems, setSystemErrorEnabled, isProblem, error, addLogger, warnAt, reportAnyLevel, error, infoAt, setLineConsumer, infoAt, errorAt, setAnsiColoringEnabled, error, infoAt, warnAt, info, errorAt, warnAt, defaultFormatOptions, warnAt, errorAt, errorAt, getWriter, getLevel, errorAt, log, isSilent, errorAt, errorAt, errorAt

Field Details

SERIALIZATION_FORMAT

public static final String SERIALIZATION_FORMAT

See Also:

Constant Field Values


Method Details

configureSerializer

public static void configureSerializer()


self

protected GlobalReporter self()

Overrides:

AbstractReporter


globalInstance

public static GlobalReporter globalInstance()


forClass

public static GlobalReporter forClass(Class<?> clazz)

Gets a GlobalReporter instance for the specifie class.

Parameters:

clazz - the class to get a GlobalReporter instance for.


forSource

public static GlobalReporter forSource(String fqcn)

Gets a GlobalReporter instance for the specifie class.

Parameters:

fqcn - the fully qualified name of the class to get a GlobalReporter instance for.


setLevel

public GlobalReporter setLevel(Level level)

Sets the level of output when logging directly to the console.

Overrides:

AbstractReporter


setLevel

public GlobalReporter setLevel(String fqcn, Level level)

Sets the reporting level for the specified class.

Parameters:

fqcn - the fully qualified class name of the class to set the level for.

level - the level to set for the class.


setLevelInternal

public GlobalReporter setLevelInternal(String fqcn, Level level)


setLevels

public GlobalReporter setLevels(Properties properties)


setDiagnosticConsumer

public GlobalReporter setDiagnosticConsumer(Consumer<Diagnostic> collector)

Overrides:

AbstractReporter


setProblemConsumer

public GlobalReporter setProblemConsumer(Consumer<Diagnostic> collector)

Overrides:

AbstractReporter


setSystemOutputEnabled

public GlobalReporter setSystemOutputEnabled(boolean b)


setImmediateFlushEnabled

public GlobalReporter setImmediateFlushEnabled(boolean b)


getDiagnosticConsumer

protected Consumer<Diagnostic> getDiagnosticConsumer()

Overrides:

AbstractReporter


getProblemConsumer

protected Consumer<Diagnostic> getProblemConsumer()

Overrides:

AbstractReporter


isSystemOutputEnabled

protected boolean isSystemOutputEnabled()

Overrides:

AbstractReporter


isImmediateFlushEnabled

protected boolean isImmediateFlushEnabled()

Overrides:

AbstractReporter


closeIpc

@io.github.qishr.cascara.common.annotation.Experimental
public void closeIpc()


report

public void report(Diagnostic diagnostic)

Central reporting method.All other rporting methods call this.

Overrides:

AbstractReporter


logLine

protected void logLine(Level level, String msgLine)

Overrides:

AbstractReporter