Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add Logging.BelowMinLevel and Logging.AboveMaxLevel to the manual page for the Logging stdlib #52232

Merged
merged 7 commits into from
Feb 11, 2024

Conversation

DilumAluthge
Copy link
Member

@DilumAluthge DilumAluthge commented Nov 19, 2023

According to the source code file, Logging.BelowMinLevel and Logging.AboveMaxLevel are already part of the public API of the Logging stdlib:

# The following are also part of the public API, but not exported:
#
# 1. Log levels:
# BelowMinLevel, Debug, Info, Warn, Error, AboveMaxLevel,
#
# 2. AbstractLogger message related functions:
# handle_message, shouldlog, min_enabled_level, catch_exceptions,

Additionally, Logging currently exports BelowMinLevel and AboveMaxLevel:

export
AbstractLogger,
LogLevel,
NullLogger,
@debug,
@info,
@warn,
@error,
@logmsg,
with_logger,
current_logger,
global_logger,
disable_logging,
SimpleLogger,
ConsoleLogger,
BelowMinLevel,
Debug,
Info,
Warn,
Error,
AboveMaxLevel

However, Logging.BelowMinLevel and Logging.AboveMaxLevel are not currently in the manual.

This PR adds them to the manual.

@DilumAluthge DilumAluthge added domain:docs This change adds or pertains to documentation logging The logging framework labels Nov 19, 2023
"""
BelowMinLevel

Alias for [`LogLevel(-1_000_001)`](@ref LogLevel).
Copy link
Contributor

Choose a reason for hiding this comment

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

imo it would be helpful to have a more descriptive docstring; e.g. what are these for? how should they be used?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I think that would be good. I'm not sure what the intended usage is. I've been using BelowMinLevel in Logging.disable_logging(Logging.BelowMinLevel), which I use as a workaround for #52234.

@c42f Could you weigh in on the intended usage of BelowMinLevel and AboveMaxLevel?

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

It looks like none of the others have a useful description either, so this seems to fit in

@DilumAluthge
Copy link
Member Author

Bump @c42f

Copy link
Contributor

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

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

It would be great if @c42f could chime in, but IMHO even without that this is an improvement (yeah maybe it could be even better, but what can't be...)

@vtjnash vtjnash added the status:merge me PR is reviewed. Merge when all tests are passing label Feb 10, 2024
@DilumAluthge DilumAluthge merged commit 3560036 into master Feb 11, 2024
7 checks passed
@DilumAluthge DilumAluthge deleted the dpa/BelowMinLevel-document branch February 11, 2024 18:43
@DilumAluthge DilumAluthge removed the status:merge me PR is reviewed. Merge when all tests are passing label Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation logging The logging framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants