Skip to main content
Copyright (c) 2016 Harvard University / iCommons

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Description: ====================
Dj-Log-Config-Helper
====================

Centralize management of simple log configuration across Django projects

The ``dj_log_config_helper.configure_installed_apps_logger`` method configures either a console or file logger with a list of all the top-level app module packages being installed in ``INSTALLED_APPS``. Use this method in your ``settings.py`` file.

Meta
----

* Author: Jaime Bermudez
* Email: jaime_bermudez@harvard.edu
* Maintainer: Harvard University Academic Technology
* Email: tlt-ops@g.harvard.edu
* Status: active development, stable, maintained


Installation
------------
Simply run the following from within a virtualenv::

$ pip install git+https://github.com/Harvard-University-iCommons/dj-log-config-helper

Running the tests
-----------------
Via make::

$ make test

Usage
-----
Import the log config function in ``settings.py``::

from dj_log_config_helper import configure_installed_apps_logger

Disable Django's default logging::

LOGGING_CONFIG = None

At the end of ``settings.py`` configure a simple console logger::

configure_installed_apps_logger(logging.INFO)

Or, configure a verbose file logger::

configure_installed_apps_logger(logging.INFO, verbose=True, filename='django-project.log')

You can also log additional packages that are not part of INSTALLED_APPS::

configure_installed_apps_logger(logging.INFO, additional_packages=['py.warnings'])

Platform: any
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5

Metadata

Release files for dj-log-config-helper 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dj-log-config-helper 0.2.3
File Size Uploaded
dj-log-config-helper-0.2.3.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dj-log-config-helper 0.2.3
File Interpreter ABI Platform
dj_log_config_helper-0.2.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 11.5 kB

Release files / dj-log-config-helper-0.2.3.tar.gz

Download URL dj-log-config-helper-0.2.3.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0b1a30309a368cfd0c0e9848b98d05102ba520bbf301ef99d4d1307c1b764195
BLAKE2b-256 checksum
How to use checksums
4ad2ddb9aa7b7b7fe377178590d76f71d19115349674e3b08e03d9eade2b1b8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / dj_log_config_helper-0.2.3-py2.py3-none-any.whl

Download URL dj_log_config_helper-0.2.3-py2.py3-none-any.whl
Size 7.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
83feaf9119ad31e3dbbe16201663c04ecf2a2297f35201722ecaf67c04589d4a
BLAKE2b-256 checksum
How to use checksums
8e0ad6b83e9455fca98c1ca8b056f638574fa0cb25c867bb8fd7c011e26e7f34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page