3 Commits
Author SHA1 Message Date
Ashlesha Atrey f6dcd44f21 Implement logging for mixer
Implement the logging package for mixer.

A common log file can be set for all the mixer commands in the
builder.conf. E.g. `mixer config set Mixer.LOG <filepath>`

The log file and level can also be set for individual mixer
commands using the `--log` and `--log-level` flags respectively.

The various log levels are:
ERROR (1), WARNING (2), INFO (3), DEBUG (4) and VERBOSE (5).
Default log level is 4.

Fixes #666

Signed-off-by: Ashlesha Atrey ashlesha.atrey@intel.com
2020-04-30 13:57:58 -07:00
Rodrigo Chiossi 70a3f68c58 global: Use log package for Warnings and Errors
This patch changes how Warnings and Error messages are printed
throughout the code to use the `log` package instead of `fmt`. This
allows for finer control over what is printed and where it is printed
to.

Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com>
2018-10-23 10:04:52 -07:00
Caio Marcelo de Oliveira Filho f4a44d7e62 swupd-extract: move clientState to an internal package
The client.State struct is used to download and query manifests and
files from a specific swupd repository (and version). It does support
caching of data.

Besides the expected changes to make it is own package

- Only print "downloading" messages when Verbose is set in the struct
- Allow not passing an expected hash when verifying bundles
- Add a GetMoM function to the client.State

This is still an internal package since I think it needs more
iterations before becoming a public package. That said, the upcoming
swupd-inspector tool was implemented with almost no significant change
to the original code.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2018-05-29 13:35:05 -07:00