Opened 10 years ago

Closed 10 years ago

#21425 closed Cleanup/optimization (fixed)

Logging documentation improvement

Reported by: Pablo Oubiña Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords: logging, levels, log,
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Now https://docs.djangoproject.com/en/dev/topics/logging/ says:

" Python defines the following log levels:

DEBUG: Low level system information for debugging purposes
INFO: General system information
WARNING: Information describing a minor problem that has occurred.
ERROR: Information describing a major problem that has occurred.
CRITICAL: Information describing a critical problem that has occurred.

[...]

The logger instance contains an entry method for each of the default log levels:

logger.critical()
logger.error()
logger.warning()
logger.info()
logger.debug() "

My proposals are:

" Python defines the following log levels:

CRITICAL: Information describing a critical problem that has occurred.
ERROR: Information describing a major problem that has occurred.
WARNING: Information describing a minor problem that has occurred.
INFO: General system information.
DEBUG: Low level system information for debugging purposes.

[...]

The logger instance contains an entry method for each of the default log levels:

logger.critical()
logger.error()
logger.warning()
logger.info()
logger.debug() "

or:

" Python defines the following log levels:

DEBUG: Low level system information for debugging purposes
INFO: General system information
WARNING: Information describing a minor problem that has occurred.
ERROR: Information describing a major problem that has occurred.
CRITICAL: Information describing a critical problem that has occurred.

[...]

The logger instance contains an entry method for each of the default log levels:

logger.debug()
logger.info()
logger.warning()
logger.error()
logger.critical() "

Change History (2)

comment:1 by Tim Graham, 10 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

The second ordering is consistent with the Python docs.

comment:2 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 3ccc0253f2a29fe6f3227ca96dcab20143188b21:

Fixed #21425 -- Made order in which loggers are introduced consistent.

Thanks oubiga for the suggestion.

Note: See TracTickets for help on using tickets.
Back to Top