|
def | __init__ (self, args=None, **kwargs) |
|
def | emit (self, topic, msg, stamp=None, match=None, index=None) |
|
def | emit_meta (self) |
|
def | is_highlighting (self) |
|
def | __enter__ (self) |
|
def | __exit__ (self, exc_type, exc_value, traceback) |
|
def | autodetect (cls, target) |
|
def | bind (self, source) |
|
def | close (self) |
|
def | flush (self) |
|
def | thread_excepthook (self, text, exc) |
|
def | validate (self) |
|
def | format_message (self, msg, highlight=False) |
|
def | message_to_yaml (self, val, top=(), typename=None) |
|
Prints messages to console.
Definition at line 506 of file outputs.py.
◆ __init__()
def grepros.outputs.ConsoleSink.__init__ |
( |
|
self, |
|
|
|
args = None , |
|
|
** |
kwargs |
|
) |
| |
@param args arguments as namespace or dictionary, case-insensitive
@param args.color False or "never" for not using colors in replacements
@param args.highlight highlight matched values (default true)
@param args.meta whether to print metainfo
@param args.emit_field message fields to emit if not all
@param args.noemit_field message fields to skip in output
@param args.line_prefix print source prefix like bag filename on each message line
@param args.max_field_lines maximum number of lines to print per field
@param args.start_line message line number to start output from
@param args.end_line message line number to stop output at
@param args.max_message_lines maximum number of lines to output per message
@param args.lines_around_match number of message lines around matched fields to output
@param args.matched_fields_only output only the fields where match was found
@param args.wrap_width character width to wrap message YAML output at
@param args.match_wrapper string to wrap around matched values,
both sides if one value, start and end if more than one,
or no wrapping if zero values
@param kwargs any and all arguments as keyword overrides, case-insensitive
Reimplemented from grepros.outputs.Sink.
Definition at line 523 of file outputs.py.
◆ emit()
def grepros.outputs.ConsoleSink.emit |
( |
|
self, |
|
|
|
topic, |
|
|
|
msg, |
|
|
|
stamp = None , |
|
|
|
match = None , |
|
|
|
index = None |
|
) |
| |
◆ emit_meta()
def grepros.outputs.ConsoleSink.emit_meta |
( |
|
self | ) |
|
◆ is_highlighting()
def grepros.outputs.ConsoleSink.is_highlighting |
( |
|
self | ) |
|
◆ _prefix
grepros.outputs.ConsoleSink._prefix |
|
private |
◆ CONTEXT_PREFIX_SEP
string grepros.outputs.ConsoleSink.CONTEXT_PREFIX_SEP = "-" |
|
static |
◆ DEFAULT_ARGS
grepros.outputs.ConsoleSink.DEFAULT_ARGS |
|
static |
Initial value:= dict(COLOR=True, EMIT_FIELD=(), NOEMIT_FIELD=(), HIGHLIGHT=True, META=False,
LINE_PREFIX=True, MAX_FIELD_LINES=None, START_LINE=None,
END_LINE=None, MAX_MESSAGE_LINES=None, LINES_AROUND_MATCH=None,
MATCHED_FIELDS_ONLY=False, WRAP_WIDTH=None, MATCH_WRAPPER=None)
Constructor argument defaults.
Definition at line 517 of file outputs.py.
◆ MATCH_PREFIX_SEP
string grepros.outputs.ConsoleSink.MATCH_PREFIX_SEP = ":" |
|
static |
◆ MESSAGE_SEP_TEMPLATE
string grepros.outputs.ConsoleSink.MESSAGE_SEP_TEMPLATE = "{ll0}{sep}{ll1}" |
|
static |
◆ META_LINE_TEMPLATE
string grepros.outputs.ConsoleSink.META_LINE_TEMPLATE = "{ll0}{sep} {line}{ll1}" |
|
static |
◆ PREFIX_TEMPLATE
string grepros.outputs.ConsoleSink.PREFIX_TEMPLATE = "{pfx0}{batch}{pfx1}{sep0}{sep}{sep1}" |
|
static |
◆ SEP
string grepros.outputs.ConsoleSink.SEP = "---" |
|
static |
The documentation for this class was generated from the following file: