Skip to first unread message

Desmond Kang

Jun 14, 2022, 12:15:50 PM6/14/22
to ONOS Developers
Hi ONOS Developers,
I'm Developing apps on ONOS using Bazel and I want to know whether if my variables are getting the right values, so I want to use the log.debug() method to print them out in a CLI interface.

I've tested using "bazel run onos-local -- clean debug" but did not see my log messages come out.

I want to ask how do you guys do it. Is there a special command where you guys type when starting the onos service in debug mode? like "bazel run onos-local -- clean debug" ? And after the onos service is running, where do you guys see the log output? Is it from the same terminal where we typed in the run onos command? or from the onos cli? 

Thanks in advance!

Davide Scano

Jun 14, 2022, 12:21:01 PM6/14/22
to ONOS Developers,
Hi Desmond,

You can use in the ONOS CLI log:tail DEBUG and you get only the log.debug messages,  you should also see them in the ONOS log. For testing your application you can develop unit test or test your app in your use case.


Desmond Kang

Jun 15, 2022, 8:53:52 AM6/15/22
to ONOS Developers,, Desmond Kang
Hi, I've tried using "log:tail DEBUG" in the CLI, but nothings shows up.
I tried to search for the log documentation but dont seem to find any clues about log:tail taking any parameters.
2022-06-15 20_53_06-Clipboard.png

Desmond Kang

Jun 15, 2022, 8:58:35 AM6/15/22
to ONOS Developers, Desmond Kang,
Hi, I found the solution.
first, enter 'log:get' to check the logging level of the ROOT entry, mine was INFO level, then I enter 'log:set DEBUG'. Now I'm getting DEBUG messages.
Reply all
Reply to author
0 new messages