Skip to content

Control command's log level via a flag #2089

@PradeepKiruvale

Description

@PradeepKiruvale

Is your feature improvement request related to a problem? Please describe.

The tedge CLI framework is used in thin-edge devices to create/update configs, create certificates, and connect to the cloud. It's also used to subscribe and publish MQTT messages. If something goes wrong while the CLI framework is being used, there is no way to debug, it can’t print more information about what is happening.

For example it is useful to set the log level to debug when things aren't working as expected, e.g. when trying to connect thin-edge.io to Cumulocity and you want more details like certificate info etc.

tedge connect c8y --log-level trace

Describe the solution you'd like

Enable the debug feature to tedge the CLI framework,

  • Add a --log-level <level> flag to all tedge binaries (e.g. tedge, tedge-agent, tedge-mapper`

Describe alternatives you've considered

  • Add --debug flag. When debug flag is enabled, this will print the info, warn, debug, trace log messages.
  • Add log messages in the tedge code at appropriate places to make it easy to debug

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions