Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/87174?usp=email )
Change subject: cli: Set maximum log level for log callback ......................................................................
cli: Set maximum log level for log callback
Follow up on commit 6571f263b52710579f27b3c53ade52d46acbc8e3 which adds ability to set maximum log level to log callback API. And INFO as the default.
cli at the moment processes all the messages in the callback, so log level should be maximum possible to get all the messages.
Alternative to this could be setting the default max log level for callback as SPEW.
Change-Id: I70a02ea1a1d692267fd6d92cdb5273786a913777 Signed-off-by: Anastasia Klimchuk aklm@flashrom.org --- M cli_classic.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/74/87174/1
diff --git a/cli_classic.c b/cli_classic.c index d0c7114..3e5dab9 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -1110,6 +1110,9 @@ * chip when a flash device gets opened with fd 1 or 2. */ if (check_file(stdout) && check_file(stderr)) { + /* This is maximum log level for callback to be invoked, + * and cli wants callback to be always invoked. */ + flashrom_set_log_level(FLASHROM_MSG_SPEW); flashrom_set_log_callback(&flashrom_print_cb); }