LogoLogo
Official SiteAPI Reference
stable/3.0
stable/3.0
  • Cement Developer Guide
  • Release Information
    • What's New!
    • Upgrading
    • ChangeLog
    • Deprecations
  • Getting Started
    • Installation
    • Developer Tools
    • Framework Overview
    • Beginner Tutorial
      • Part 1: Creating Your First Project
      • Part 2: Adding Features
      • Part 3: Extending a Project
      • Part 4: Making Everything Legit
  • Core Foundation
    • Interfaces and Handlers
    • Hooks
    • Configuration Settings
    • Arguments
    • Logging
    • Controllers
    • Output Rendering
    • Caching
    • Mail Messaging
    • Framework Extensions
    • Application Plugins
    • Templating
  • Utilities
    • Filesystem
    • Shell
    • Miscellaneous
  • Extensions
    • Alarm
    • Argparse
    • Colorlog
    • ConfigParser
    • Daemon
    • Dummy
    • Generate
    • Jinja2
    • Json
    • Logging
    • Memcached
    • Mustache
    • Plugin
    • Print
    • Redis
    • Scrub
    • SMTP
    • Tabulate
    • Yaml
    • Watchdog
  • Additional Topics
    • Extending The App Object
    • Unit Testing
    • Cleanup
    • Signal Handling
    • Pipenv
    • Autocomplete
    • Profiling with cProfile
    • Debugging with VSCode
  • Environment Variables
  • Terminology
  • Contributing
  • Privacy Policy
Powered by GitBook
On this page
  • Enabling Deprecation Warnings
  • Cement v3.0.10
  • 3.0.10-1
  • Cement v3.0.8
  • 3.0.8-1
  • 3.0.8-2
  1. Release Information

Deprecations

PreviousChangeLogNextGetting Started

Last updated 1 year ago

Enabling Deprecation Warnings

Deprecation warnings are handled by the same warning system as Python using the warnings library. To enable warning, set the environment variable.

export PYTHONWARNINGS=once

Python warnings should always be enabled for unit tests. Pytest, the default testing framework for Cement generated projects, enables this by default.

Cement v3.0.10

3.0.10-1

The logging facility FATAL is being deprecated in favor of CRITICAL. This follows the standard library upstream:

Though the FATAL facility upstream, it makes sense to deprecate it in Cement.

Support for the FATAL facility, and app.log.fatal() may be removed any time in or after Cement v3.2.0.

Developers should modify their apps to use critical:

app.log.set_level('CRITICAL')
app.log.critical('Some log message')

Cement v3.0.8

3.0.8-1

Related:

Usage:

export CEMENT_LOG=1

myapp {command, options, etc}

Setting CEMENT_LOG=1 will set App.Meta.framework_logging = True.

Support for CEMENT_FRAMEWORK_LOGGING will be removed in Cement v3.2.0.

3.0.8-2

In Cement 3.2.0, the logic of App.Meta.framework_logging will be repurposed, or removed. The plan, currently, is that --debug will only toggle the logging level and App.Meta.debug but not toggle Cement framework logging. One thought is that App.Meta.framework_logging could trigger framework/extensions to use the App logger, once it is available (instead of MinimalLogger everywhere).

As of 3.0.8, you can use CEMENT_LOG=1 (environment variable) instead of --debug for the same functionality.

FIXME: Exact details to be determined.

Related:

The environment variable CEMENT_FRAMEWORK_LOGGING is being deprecated in favor of .

In Cement v3.0.x, the default for is True, however framework logging is only triggered if the --debug option is passed at the command-line. The --debug option was previously hard-coded, but is now configurable and therefore should no longer be used to toggle framework logging.

PYTHONWARNINGS
https://docs.python.org/3/library/logging.html#logging-levels
may never be fully removed
https://github.com/datafolklabs/cement/issues/638
App.Meta.framework_logging
https://github.com/datafolklabs/cement/issues/612
https://github.com/datafolklabs/cement/issues/613
CEMENT_LOG