- Issue created by @mfb
- Merge request !7151Issue #3432889: Make the map of PSR3 to RFC 5424 log level constants available as a constant β (Open) created by mfb
- Status changed to Needs review
9 months ago 4:08am 22 March 2024 - Status changed to RTBC
9 months ago 6:08pm 25 March 2024 - Status changed to Needs review
9 months ago 9:13pm 25 March 2024 - π¦πΊAustralia mstrelan
Wonder if we'd be better off making RfcLogLevel in to an enum and move the mapping to a function there. Setting NR for the idea, please set to NW if you agree or back to RTBC if not.
- πΊπΈUnited States mfb San Francisco
@mstrelan I think you're suggesting an API change, if the RfcLogLevels would be objects rather than simple constants? That doesn't seem worth the developer friction to do.
Ok, I guess you could have an enum that also has the original constants pointing to the enum values, and there would be no API change, but then, what's the point?
Note also that Drupal\Core\Logger\RfcLogLevel is basically drupal's (moar RFC-compliant) version of Psr\Log\LogLevel, so it seems reasonable for them to have the same architecture.
- π¦πΊAustralia mstrelan
This is what I had in mind, happy to be told it's not worth it, just thought it was worth considering.
https://git.drupalcode.org/project/drupal/-/merge_requests/7178
- Status changed to Needs work
9 months ago 11:07pm 25 March 2024 The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- πΊπΈUnited States mfb San Francisco
@mstrelan: Seems not worth it for the reasons I said in #6 but, if you want to discuss you could open a new issue? It seems only tangentially related to this issue, which was just to make the level map available, not to change any public APIs.
- πΊπΈUnited States mfb San Francisco
Well, in the contrib module that this would've been useful for, I ended up introducing my own LogLevel enum to manage all the log level logic :)
So, I don't really need this anymore; feel free to close this issue as far as I'm concerned (or, perhaps the original feature request could still be useful for other developers).
- π³πΏNew Zealand quietone
This looks familiar. Searching found an earlier issue for this which I closed as a duplicate.
- πΊπΈUnited States mfb San Francisco
@quietone I actually suggested closing this issue, as it was pretty trivial to copy the map into two contrib modules where this feature could've been useful. Btw, I don't see how that other issue is a duplicate?