ot-ns icon indicating copy to clipboard operation
ot-ns copied to clipboard

[cli] New CLI command 'log' to change log level.

Open EskoDijk opened this issue 2 years ago • 5 comments

Here is a separate PR for the 'log' CLI command that I use. It seems a good idea to separate features not related to the radiomodel feature as separate PRs as suggested by @simonlingoogle .

It can be tested by e.g. entering the command "log debug" and then do an action like sending a ping or adding a node.

EskoDijk avatar Aug 28 '22 21:08 EskoDijk

Codecov Report

Merging #347 (1fb9e68) into main (c616148) will decrease coverage by 0.10%. The diff coverage is 12.50%.

@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
- Coverage   49.97%   49.86%   -0.11%     
==========================================
  Files          38       38              
  Lines        4608     4610       +2     
==========================================
- Hits         2303     2299       -4     
- Misses       2123     2129       +6     
  Partials      182      182              
Impacted Files Coverage Δ
cli/CmdRunner.go 22.79% <0.00%> (-0.35%) :arrow_down:
cli/ast.go 66.66% <ø> (ø)
dispatcher/dispatcher.go 57.10% <0.00%> (ø)
web/site/bindata.go 99.00% <ø> (-0.01%) :arrow_down:
otnstester/OtnsTest.go 89.44% <100.00%> (ø)

codecov-commenter avatar Aug 28 '22 21:08 codecov-commenter

@jwhui Would need https://github.com/openthread/ot-ns/pull/324 to resolve CI fails.

simonlingoogle avatar Aug 29 '22 01:08 simonlingoogle

Can we add a method to get/set log level in OTNS.py @EskoDijk

simonlingoogle avatar Aug 29 '22 01:08 simonlingoogle

Can we add a method to get/set log level in OTNS.py @EskoDijk

I added a str property in OTNS.py.

EskoDijk avatar Aug 29 '22 07:08 EskoDijk

Can we add a method to get/set log level in OTNS.py @EskoDijk

I added a str property in OTNS.py.

👍 Great idea to use @property.

simonlingoogle avatar Aug 29 '22 07:08 simonlingoogle