zoukankan      html  css  js  c++  java
  • django logging

    LOG_LEVEL = 'DEBUG'

    LOGGING = {

        'version' : 1,

        'disable_existing_loggers' : True,

        'formatters' : {

                'standard' : {

                    'format' : '%(asctime)s [%(threadName)s:%(thread)d] [%(name)s:%(lineno)d] z [%(levelname)s]- %(message)s'

                },

                'verbose' : {

                    'format' : '[%(asctime)s] %(levelname)-6s %(name)s %(lineno)d %(threadName)s:%(thread)d %(message)s'

                },

        },

        'filters': {

        },

        'handlers': {

            'torstatus': {

                'level': LOG_LEVEL,

                'class': 'logging.handlers.RotatingFileHandler',

                'filename': os.path.join(BASE_DIR ,'logs/torstatus.log'), 

                'maxBytes': 1024*1024*5, # 5 MB

                'backupCount': 5,

                'formatter': 'verbose',

            },

            

        },

        'loggers': {

            'torstatus': {

                'handlers': ['torstatus'],

                'level': LOG_LEVEL,

                'propagate': False

            },

        }

    }

  • 相关阅读:
    scanf与scanf_s的区别
    PAT 1041 考试座位号
    PAT1018 锤子剪刀布
    Cookie
    JSP--原理
    多线程练习题
    Java线程--线程的同步与锁
    有关toString()和println(Object)
    Java Web请求和响应机制
    IO流
  • 原文地址:https://www.cnblogs.com/zhengze/p/10702289.html
Copyright © 2011-2022 走看看