dispatch

@Nullable()
public @Nullable() Level dispatch(OutputStreamType type, String line)

Determines the logging level for a given line of output from a managed process.

This method can be overridden by subclasses to implement custom logging logic. For example, it can be used to parse the line content to determine a more appropriate log level, or to suppress logging for certain lines entirely.

The line parameter is not used in this default implementation but is provided for subclasses that may need to inspect the line content for dispatching.

Return

The SLF4J org.slf4j.event.Level at which this line should be logged. Returning null will cause this line to not be logged at all. The default implementation returns INFO for STDOUT and ERROR for STDERR.

Parameters

type

The type of output stream (STDOUT or STDERR) from which the line originated.

line

The actual line of text output by the process.