Closed heckj closed 2 years ago
This sounds good, thanks for spotting it! Would be send in a PR please? Thanks in advance!
Absolutely, #225 up as the most minimal update that solves the issue.
@heckj if we don't have one already, I think this would be a good enhancement for DocC as well. DocC already has the line number information so there's no reason it couldn't sort by line number instead of alphabetically in situations like this.
Expected behavior
The generated Documentation (using DocC) describing the log levels would be ordered as they are in the source file
Actual behavior
The generated Documentation (using DocC) with swift-log presented the levels in alphabetical order
Screenshot attached
the ordering of which doesn't match the expected ordering from the source:
I ran into this while working on a Vapor project, and realized the ordering in the generated DocC meant that the descriptions were very "out of whack" for reading with any intention of what the ordering SHOULD be.
swift-log doesn't currently have a DocC catalog - which is where you could put the explicit ordering for this sort of scenario, as least in the case of DocC generated content.
Steps to reproduce
If possible, minimal yet complete reproducer code (or URL to code)
main branch as well as the 1.4.2 branch of swift-log
SwiftLog version/commit hash
main
HEAD)Swift & OS version (output of
swift --version && uname -a
)