Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--silent is not completely silent #12

Closed
remcoder opened this issue Jul 19, 2016 · 3 comments
Closed

--silent is not completely silent #12

remcoder opened this issue Jul 19, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@remcoder
Copy link
Contributor

remcoder commented Jul 19, 2016

I'd like to consume the output of say the fsinfo command with other tools but the --silent option doesn't remove all status messages. Here's an example when using the json dump:

$ nodemcu-tool --silent fsinfo --json
[NodeMCU-Tool] Project based configuration loaded
{"files":[{"name":"init.lua","size":503},{"name":"patterns/clear.lua","size":88},{"name":"mqttclient.lua","size":1236},{"name":"patterns/rotate_green.lua","size":892},{"name":"patterns/rotate_blue.lua","size":746},{"name":"patterns/green.lua","size":105},{"name":"patterns/test.lua","size":470},{"name":"wifi.lua","size":257},{"name":"patterns/red.lua","size":106},{"name":"commands/reboot.lua","size":42},{"name":"patterns/blue.lua","size":123},{"name":"commands/ip.lua","size":24},{"name":"utils.lua","size":4502},{"name":"animator.lua","size":1276},{"name":"main.lua","size":138},{"name":"httpserver.lua","size":2059},{"name":"commands/test.lua","size":59}],"meta":{"remaining":3341,"used":18,"total":3360}}

As a temporary workaround I'm using tail to skip the first line:

nodemcu-tool fsinfo --json | tail -n +2 | ..etc
@AndiDittrich
Copy link
Owner

Dear remcoder,
thanks for your report!

i've forgot to add the output suppression to the binary/executable file. therefore some messages will be printed. i will fix it asap.

best regards, Andi

@AndiDittrich AndiDittrich self-assigned this Jul 22, 2016
@AndiDittrich AndiDittrich modified the milestones: v1.6.1, v1.7.0 Jul 22, 2016
@AndiDittrich
Copy link
Owner

Fix is added to 1.7.0-BETA1.

i've modified the overall log-management of NodeMCU-Tool by using logging-facility

status messages are completely suppressed by using the --silent or --json flag

@remcoder
Copy link
Contributor Author

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants