Skip to content

pkg_install: modify log levels & print destdir by default.#891

Merged
aiuto merged 1 commit intobazelbuild:mainfrom
jacky8hyf:pkg_install_destdir
Sep 16, 2024
Merged

pkg_install: modify log levels & print destdir by default.#891
aiuto merged 1 commit intobazelbuild:mainfrom
jacky8hyf:pkg_install_destdir

Conversation

@jacky8hyf
Copy link
Contributor

After this change, log levels are defined by the following:

  • -q: only print errors (not even warnings)
  • (default): print errors, warnings, infos
  • -v: print above & also debug logs.

There are no errors and warnings logs at this moment. The existing verbose logs about file operations are categorized as debug logs, so they are only printed when -v is set.

By default (if no flag is set), the destdir is printed as an INFO level log.

Also improve the logging format to be similar to bazel's output, e.g.

INFO: Installing to /tmp/inst

Fixes #889

After this change, log levels are defined by the following:
* -q: only print errors (not even warnings)
* (default): print errors, warnings, infos
* -v: print above & also debug logs.

There are no errors and warnings logs at this moment.
The existing verbose logs about file operations are
categorized as debug logs, so they are only printed
when -v is set.

By default (if no flag is set), the destdir is printed
as an INFO level log.

Also improve the logging format to be similar to bazel's output, e.g.

    INFO: Installing to /tmp/inst

Fixes bazelbuild#889
@jacky8hyf
Copy link
Contributor Author

There are no errors and warnings logs at this moment.

I missed that there are some critical logs. However this change does not change when critical logs are printed (they are always printed).

Copy link
Collaborator

@cgrindel cgrindel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@aiuto aiuto merged commit df9f345 into bazelbuild:main Sep 16, 2024
@jacky8hyf jacky8hyf deleted the pkg_install_destdir branch September 17, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow pkg_install() to print destdir by default

3 participants