当前位置: 首页>>代码示例>>Python>>正文


Python LOG_LEVELS.iteritems方法代码示例

本文整理汇总了Python中sentry.constants.LOG_LEVELS.iteritems方法的典型用法代码示例。如果您正苦于以下问题:Python LOG_LEVELS.iteritems方法的具体用法?Python LOG_LEVELS.iteritems怎么用?Python LOG_LEVELS.iteritems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sentry.constants.LOG_LEVELS的用法示例。


在下文中一共展示了LOG_LEVELS.iteritems方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: dict

# 需要导入模块: from sentry.constants import LOG_LEVELS [as 别名]
# 或者: from sentry.constants.LOG_LEVELS import iteritems [as 别名]
from sentry.app import cache, env
from sentry.constants import DEFAULT_LOG_LEVEL, LOG_LEVELS, MAX_TAG_VALUE_LENGTH, MAX_TAG_KEY_LENGTH
from sentry.exceptions import InvalidTimestamp
from sentry.interfaces.base import get_interface
from sentry.models import Project, ProjectKey
from sentry.tasks.store import preprocess_event
from sentry.utils import is_float, json
from sentry.utils.auth import parse_auth_header
from sentry.utils.compat import StringIO
from sentry.utils.strings import decompress


logger = logging.getLogger("sentry.coreapi")

LOG_LEVEL_REVERSE_MAP = dict((v, k) for k, v in LOG_LEVELS.iteritems())

RESERVED_FIELDS = (
    "project",
    "event_id",
    "message",
    "checksum",
    "culprit",
    "level",
    "time_spent",
    "logger",
    "server_name",
    "site",
    "timestamp",
    "extra",
    "modules",
开发者ID:achun2080,项目名称:sentry,代码行数:32,代码来源:coreapi.py

示例2:

# 需要导入模块: from sentry.constants import LOG_LEVELS [as 别名]
# 或者: from sentry.constants.LOG_LEVELS import iteritems [as 别名]
from sentry.utils import settings
from sentry.plugins import Plugin
from sentry.conf import server
from sentry.utils.http import absolute_uri
from sentry.web.helpers import render_to_string
from sentry.constants import LOG_LEVELS

import sentry_pushover
import requests


message_template = 'sentry_pushover/error.txt'
message_template_alert = 'sentry_pushover/alert.txt'

choices_levels = ((i, level.upper()) for i, level in LOG_LEVELS.iteritems())
choices_sounds = ((
    ('pushover', 'Pushover (default)'),
    ('bike', 'Bike'),
    ('bugle', 'Bugle'),
    ('cashregister', 'Cash Register'),
    ('classical', 'Classical'),
    ('cosmic', 'Cosmic'),
    ('falling', 'Falling'),
    ('gamelan', 'Gamelan'),
    ('incoming', 'Incoming'),
    ('intermission', 'Intermission'),
    ('magic', 'Magic'),
    ('mechanical', 'Mechanical'),
    ('pianobar', 'Piano Bar'),
    ('siren', 'Siren'),
开发者ID:p0is0n,项目名称:sentry-pushover,代码行数:32,代码来源:models.py


注:本文中的sentry.constants.LOG_LEVELS.iteritems方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。