Skip to content

Add --level option to logcat command #3

@gavv

Description

@gavv

roc-vad logcat command streams logs from driver and prints them to console.

Currently it prints all messages. It would be convenient to add an option to print messages only of specified log level and below. For example, --level=3 would print only messages with levels CRIT, ERROR, WARN, INFO, and suppress DEBUG and TRACE messages. It would be nice to accept both numeric value, like --level=3 and its string shorthand, like --level=II. (Short-hands are: CC, EE, WW, II, DD, TT).

Filtering should be done on the driver side, so that extensive debug logs are not streamed if they're not needed. Hence we need to add log level parameter to stream_logs() rpc call and handle it in rpc server inside driver.

Related files:

  • rpc/driver_protocol.proto defines stream_logs() call and available log levels
  • tool/cmd_logcat.cpp - implements logcat command on the client side that calls stream_logs()
  • driver/driver_service.cpp - implements stream_logs() call in the rpc service

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-command-linecategory: Command-line toolsC-grpccategory: gRPC supportgood first issueTask good for newcomershelp wantedLooking for contributors

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions