Repository navigation
Several misc logging fixes - #280
Merged
Merged
Conversation
When debug logging is enabled these messages produce the vast majority of noise, for practically every value read from the YAML. I don't have a well-articulated policy for when to use TRACE vs DEBUG, but I feel that DEBUG should still be informative to users while TRACE is strictly for the lowest-level info mostly for debugging the library, as opposed to debugging *uses* of the library, if that makes sense...
especially important if the underlying stream is buffered, so that log messages don't get lost, or come out clumped together.
Add several new tests for the logging system, especially some regression tests for bugs that need to be fixed (errno saving, tty color handling, malformatting of messages when certain fields are disabled). Several existing tests that tested for specific log messages each used some different mechanisms for capturing the log. This standardizes that as well into a single log capture utility (though hopefully this will be less needed once asdf-formatgh-279 is implemented).
Trying to integrate libasdf's logging mechanism into a separate application like SourceXtractor++ (see asdf-formatgh-24) surfaced a number of small bugs and necessary enhancements. What it really wants is a new structured logging interface as explained in asdf-formatgh-279. However, with or without that these bugs are all relevant, even just for libasdf itself. The details are listed in the changelog fragment.
Depending on the build path location it would generate relative paths from the build directory to the top_srcdir, resulting in noisy diffs if re-running from different build directories.
…LOG_COLOR SE++ needs uncolored logs so it can parse them easily and feed them into its own logger without having to wade through ANSI escapes, and we shouldn't let the user override that via a stray environment variable either. An application setting no_color has a stronger claim here. Instead the ASDF_LOG_COLOR env var just overrides the isatty detection for the default behavior. Will be less relevant once asdf-formatgh-279 is done though.
List items following normal paragraphs *without* a blank line where just merged into that paragraph and incorrectly wrapped, rather than being treated as its own paragraph-like block in the first place. Ideally this would work better if it used the docutils rst outputter, but that would require an extra dependency I don't want to deal with right now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
See the changelog fragment for details. Fixed several bugs in the logging surfaced while trying to integrate it into SourceXtractor++ (#24). These are useful fixes even without #279 (to be added later) which is the full solution.
AI Disclosure
No AI tools used.