def test_digiformathandler(): logger = logging.getLogger("sizebot") dfhandler = digilogger.DigiFormatterHandler() logger.handlers = [] logger.propogate = False logger.addHandler(dfhandler) logger.warning("AAAAA")
import logging import sys from datetime import datetime import discord from discord.ext import commands from digiformatter import styles, logger as digilogger from digibot import conf from digibot.lib import status from digibot.lib.discordlogger import DiscordHandler logging.basicConfig(level=logging.INFO) dfhandler = digilogger.DigiFormatterHandler(showsource = True) dfhandlerns = digilogger.DigiFormatterHandler() logger = logging.getLogger("digibot") logger.handlers = [] logger.propagate = False logger.addHandler(dfhandlerns) dlogger = logging.getLogger("discord") dlogger.handlers = [] dlogger.propagate = False dlogger.addHandler(dfhandler) initial_cogs = [ "admin", "fun", # "help",
import importlib.resources as pkg_resources import logging from pathlib import Path import asyncio from digiformatter import logger as digilogger from twitch import TwitchClient import zeatbot.data from zeatbot import conf from zeatbot.lib.irc import IRC from zeatbot.modules import baked, customs, timers, twitch # Set up logging logging.basicConfig(level=logging.INFO) dfhandler = digilogger.DigiFormatterHandler() logger = logging.getLogger("zeatbot") logger.handlers = [] logger.propagate = False logger.addHandler(dfhandler) asynciologger = logging.getLogger("asyncio") asynciologger.handlers = [] asynciologger.propagate = False asynciologger.addHandler(dfhandler) async def main(): try: conf.load()