Skip to main content

Fast access to some simple python logging tricks

Project description

flog

Fast access to some simple python logging tricks

BuildImage

Latest PyPI version Number of PyPI downloads

Installation

Either find flog on PyPI or install it with pip or easy_install

pip install flog
#or
easy_install flog

Basic Usage

Getting a logger: import flog, get a logger with flog.get_logger(__name__)

Logging calls: in and out Get a logger, decorate functions with flog.log_call(<your logger>)

Logging calls with sensitive args (such as passwords): Get a logger, decorate functions with flog.log_sensitive_call(<your logger>)

(new in version 0.1.0) In production environments, you may wish to run with the environment variable FLOG_NOWRAP set truthy. This will make flog.log_call and flog.log_sensitive_call exit as quickly as possible and not attempt to emit DEBUG-level statements. This can also be accomplished by running the interpreter in “optimized” mode (python -O <your entry> or by setting the PYTHONOPTIMIZE environment variable)

(new in version 0.2.0) flog.log_call and flog.log_sensitive_call both now optionally take a callable that will be called with logger-compatible arguments. Suggested uses would be to log at a higher-than-debug level, or piping into another stream handler.

License

This software is hereby released under the MIT License, as seen in the LICENSE file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flog-0.3.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flog-0.3.0-py2-none-any.whl (4.0 kB view details)

Uploaded Python 2

File details

Details for the file flog-0.3.0.tar.gz.

File metadata

  • Download URL: flog-0.3.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for flog-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8256c953b14535ef11f93c972f0e98406cfa3c69f32b04f04d2521678c9f7a77
MD5 d58ce11269dc778de5113eb3b3683fcb
BLAKE2b-256 8579d4d7e0b76ca1d43dded13a9bb942ce903ff4dae74194a5230f9047eabc10

See more details on using hashes here.

File details

Details for the file flog-0.3.0-py2-none-any.whl.

File metadata

  • Download URL: flog-0.3.0-py2-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for flog-0.3.0-py2-none-any.whl
Algorithm Hash digest
SHA256 799ed86cb6a7b7897879201d781c6a2e9badc930e9511d7abfd6c74b27ce1593
MD5 2e31b3efe0df62776c215b89e7222333
BLAKE2b-256 19b42a73a09aa352ef7861554b9a75ae13ba43e6d52a7140508dff5b37f8eddd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page