本文整理汇总了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",
示例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'),