معرفی شرکت ها


django-logbasecommand-0.0.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Minimal package to add logging helpers to Django management commands
ویژگی مقدار
سیستم عامل -
نام فایل django-logbasecommand-0.0.1
نام django-logbasecommand
نسخه کتابخانه 0.0.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده PPB - InfoSec Engineering
ایمیل نویسنده surface@paddypowerbetfair.com
آدرس صفحه اصلی https://github.com/surface-security/django-logbasecommand/
آدرس اینترنتی https://pypi.org/project/django-logbasecommand/
مجوز MIT
# django-logbasecommand Minimal package to add logging helpers to Django management commands ## Usage Replace ``` from django.core.management.base import BaseCommand class YourCommand(BaseCommand): ``` with ``` from logbasecommand.base import LogBaseCommand class LogBaseCommand(BaseCommand): ``` and now you can use the drop-in methods to replace `self.stdout`/`self.stderr`: * `log` * `log_debug` * `log_warning` * `log_error` * `log_exception` Or access `self.logger` directly. All command logger names are derived from the command module name and prefixed with `logbasecommand.base` (by default, use `LOGBASECOMMAND_PREFIX` setting to change it), so logging can be configured from your project settings.py, with `LOGGING`, ie (full example, check the `loggers` part): ```python LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { 'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}, 'require_debug_true': {'()': 'django.utils.log.RequireDebugTrue'}, }, 'formatters': { 'verbose': {'format': '[%(asctime)s] [%(process)s] [%(levelname)s] [%(name)s] %(message)s'}, 'minimal': {'format': '[%(levelname)s] [%(name)s] %(message)s'}, }, 'handlers': { 'console': { 'level': 'INFO', 'filters': ['require_debug_false'], 'class': 'logging.StreamHandler', 'formatter': 'verbose', }, 'console_debug': { 'level': 'DEBUG', 'filters': ['require_debug_true'], 'class': 'logging.StreamHandler', 'formatter': 'verbose', }, 'console_minimal': { 'level': 'INFO', 'filters': ['require_debug_false'], 'class': 'logging.StreamHandler', 'formatter': 'minimal', }, 'console_debug_minimal': { 'level': 'DEBUG', 'filters': ['require_debug_true'], 'class': 'logging.StreamHandler', 'formatter': 'minimal', }, 'mail_admins': { 'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler', }, }, 'loggers': { '': {'handlers': ['console', 'console_debug'], 'level': 'INFO', 'propagate': True}, 'logbasecommand.base': { 'handlers': ['console_minimal', 'console_debug_minimal'], 'level': 'DEBUG', 'propagate': False, }, }, } ```


نیازمندی

مقدار نام
<4,>=3.0 Django


زبان مورد نیاز

مقدار نام
>=3.6 Python


نحوه نصب


نصب پکیج whl django-logbasecommand-0.0.1:

    pip install django-logbasecommand-0.0.1.whl


نصب پکیج tar.gz django-logbasecommand-0.0.1:

    pip install django-logbasecommand-0.0.1.tar.gz