b/390177544 cart: Support dynamic mercury/libfabric loglevels (#15738) #16057
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Mercury and libfabric are much too spammy to enable at lower
than warning level by default. Mercury does support adjustment
of its log level and logged subsystems at runtime, so this
patch provides access to that functionality from the
existing
dmg server set-logmasks
tool.This version of the patch adds support for writing mercury/libfabric
debug logs to a separate file, in order to avoid undue burden on
the cloud logging pipeline. To use it, set HG_DBG_LOG_FILE in the
engine config to a logfile path. NB: This is a "raw" log file, i.e.
no rotation is done and it's flushed once per second.
To enable debug logging for just the mercury/libfabric libraries:
dmg server set-logmasks -m EXTERNAL=DEBUG
To disable debug logging again:
dmg server set-logmasks -m EXTERNAL=ERR
Note that the CaRT/Mercury wrapper (crt_hg.c) still uses the normal
dlog logger with the "hg" facility. If debug logging in this file is
desired, then the mask HG=DEBUG may be used for set-logmasks.
Be aware that the debug logging produced by this file is rather
copious and may cause problems for cloud logging, however!
Change-Id: Ib6fb74c42507dbfba2c5984a92433ad43b6e2df3
Signed-off-by: Michael MacDonald [email protected]