Class TAIL
java.lang.Object
org.jpos.q2.cli.TAIL
- All Implemented Interfaces:
EventListener, CLICommand, LogListener
CLI command that subscribes to one or more named loggers and streams their
events to the terminal until the user presses Enter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexec(CLIContext cli, String[] args) Executes the CLI command.Processes a log event.voidusage(CLIContext cli) Prints command usage and lists the registered loggers.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LogListener
setLogEventWriterModifier and TypeMethodDescriptiondefault voidSets the log event writer for this listener.
-
Constructor Details
-
TAIL
public TAIL()Default constructor; no instance state to initialise.
-
-
Method Details
-
exec
Description copied from interface:CLICommandExecutes the CLI command.- Specified by:
execin interfaceCLICommand- Parameters:
cli- the CLI contextargs- command arguments- Throws:
Exception- on error
-
usage
Prints command usage and lists the registered loggers.- Parameters:
cli- the CLI context to write to
-
log
Description copied from interface:LogListenerProcesses a log event.- Specified by:
login interfaceLogListener- Parameters:
ev- the log event- Returns:
- the (potentially modified) log event, or null to suppress it
-