本文整理汇总了Python中sopel.logger.get_logger函数的典型用法代码示例。如果您正苦于以下问题:Python get_logger函数的具体用法?Python get_logger怎么用?Python get_logger使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_logger函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: get_logger
Copyright © 2013, Elad Alfassa, <[email protected]>
Copyright © 2018, Adam Erdman, pandorah.org
Licensed under the Eiffel Forum License 2.
http://sopel.chat
"""
from __future__ import unicode_literals, absolute_import, print_function, division
import textwrap
import collections
import requests
from sopel.logger import get_logger
from sopel.module import commands, rule, example, priority
logger = get_logger(__name__)
def setup(bot):
global help_prefix
help_prefix = bot.config.core.help_prefix
@rule('$nick' '(?i)(help|doc) +([A-Za-z]+)(?:\?+)?$')
@example('.help tell')
@commands('help', 'commands')
@priority('low')
def help(bot, trigger):
"""Shows a command's documentation, and possibly an example."""
if trigger.group(2):
name = trigger.group(2)
开发者ID:dasu,项目名称:sopel,代码行数:31,代码来源:help.py
示例2: get_logger
import re
import sys
import time
import sopel
import sopel.module
import sopel.web
from sopel.bot import _CapReq
from sopel.tools import Identifier, iteritems, events
from sopel.tools.target import User, Channel
import base64
from sopel.logger import get_logger
if sys.version_info.major >= 3:
unicode = str
LOGGER = get_logger(__name__)
batched_caps = {}
who_reqs = {} # Keeps track of reqs coming from this module, rather than others
def auth_after_register(bot):
"""Do NickServ/AuthServ auth"""
if bot.config.core.auth_method == 'nickserv':
nickserv_name = bot.config.core.auth_target or 'NickServ'
bot.msg(
nickserv_name,
'IDENTIFY %s' % bot.config.core.auth_password
)
elif bot.config.core.auth_method == 'authserv':
开发者ID:sopel-irc,项目名称:sopel,代码行数:31,代码来源:coretasks.py
示例3: get_logger
# coding=utf-8
from __future__ import unicode_literals, absolute_import, division, print_function
from sopel import module
from sopel.logger import get_logger
import os
import lupa
import json
LOGGER = get_logger("lua")
def configure(config):
pass
def setup(bot):
dirname = os.path.join(os.path.dirname(os.path.abspath(__file__)), "sandbox")
try:
os.mkdir(dirname)
except OSError as e:
pass
class TriggerWrapper:
def __init__(self, trigger):
self._trigger = trigger
def __getattr__(self, name):
开发者ID:maxpowa,项目名称:sopel-lua,代码行数:31,代码来源:lua.py
注:本文中的sopel.logger.get_logger函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论