clicon / clixon

YANG-based toolchain including NETCONF and RESTCONF interfaces and an interactive CLI
http://www.clicon.org/
Other
216 stars 71 forks source link

Question about clixon notification #489

Closed temabeloglinski closed 8 months ago

temabeloglinski commented 8 months ago

Hi Olof! I have a question abot clixon notification. When I print error messages, I would like to hide the standard clixon messages. How can I do that? Is there a configuration setting that does this?

For example

root@cli/> commit
Feb  2 21:30:41: clicon_rpc_commit: 1552: Netconf error: Commit failed. Edit and try again or discard changes: application operation-failed destination-address are not configured
CLI command error
root@cli/>
khromenokroman commented 8 months ago

I am also interested in this, I would like to remove unnecessary messages

olofhagsand commented 8 months ago

We just modified the error/log API but which includes a customizable error: https://clixon-docs.readthedocs.io/en/latest/errors.html#customization There is also the ability to redirect the error via the -l <option> command-line option, see https://clixon-docs.readthedocs.io/en/latest/errors.html#debugging But I see here that even if you direct -l none you will still get some error on stderr: https://github.com/clicon/clixon/blob/4e3bd6fbdd94fcbfdcb856e94dc8d7d3f2230417/apps/cli/cli_plugin.c#L490 How do you want the behavior: do you not want any message on stderr?

temabeloglinski commented 8 months ago

Thanks Olof. -l syslog - that's what I need.