1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

coloredlogs test

This commit is contained in:
Steffo 2018-09-18 00:26:01 +02:00
parent c111b98dac
commit 278478249b
6 changed files with 13 additions and 8 deletions

View file

@ -5,9 +5,11 @@ import redditbot
import statsupdater
import time
import logging
import coloredlogs
logging.getLogger().setLevel(level=logging.ERROR)
logging.getLogger(__name__).setLevel(level=logging.DEBUG)
coloredlogs.install(level="DEBUG")
discord_telegram_pipe = multiprocessing.Pipe()
discord = multiprocessing.Process(target=discordbot.process, args=(discord_telegram_pipe[0],), daemon=True)

View file

@ -18,10 +18,11 @@ import logging
import errors
import datetime
import sqlalchemy.exc
import coloredlogs
logging.getLogger().setLevel(level=logging.ERROR)
logger = logging.getLogger(__name__)
logger.setLevel(level=logging.DEBUG)
coloredlogs.install(level="DEBUG", logger=logger)
# Queue emojis
queue_emojis = [":one:",
@ -349,7 +350,7 @@ class RoyalDiscordBot(discord.Client):
await self.wait_until_ready()
while True:
msg = await loop.run_in_executor(executor, connection.recv)
logger.info(f"Received \"{msg}\" from the Telegram-Discord pipe.")
logger.debug(f"Received \"{msg}\" from the Telegram-Discord pipe.")
if msg == "get cv":
discord_members = list(self.main_guild.members)
channels = {0: None}

View file

@ -7,6 +7,7 @@ import time
import raven
import os
import sys
import coloredlogs
# Init the config reader
config = configparser.ConfigParser()
@ -14,7 +15,7 @@ config.read("config.ini")
logging.getLogger().setLevel(level=logging.ERROR)
logger = logging.getLogger(__name__)
logger.setLevel(level=logging.DEBUG)
coloredlogs.install(level="DEBUG", logger=logger)
sentry = raven.Client(config["Sentry"]["token"],
release=raven.fetch_git_sha(os.path.dirname(__file__)),

View file

@ -13,4 +13,5 @@ pygments
markovify
praw
dice
raven[flask]
raven[flask]
coloredlogs

View file

@ -7,10 +7,11 @@ import os
import typing
import telegram
import sys
import coloredlogs
logging.getLogger().setLevel(level=logging.ERROR)
logger = logging.getLogger(__name__)
logger.setLevel(level=logging.DEBUG)
coloredlogs.install(level="DEBUG", logger=logger)
# Init the config reader
config = configparser.ConfigParser()

View file

@ -6,17 +6,16 @@ import errors
import stagismo
from telegram import Bot, Update, InlineKeyboardMarkup, InlineKeyboardButton
from telegram.ext import Updater, CommandHandler, CallbackQueryHandler
import telegram.error
import dice
import sys
import os
import time
import cast
import re
import logging
import configparser
import markovify
import raven
import coloredlogs
# Markov model
try:
@ -27,7 +26,7 @@ except Exception:
logging.getLogger().setLevel(level=logging.ERROR)
logger = logging.getLogger(__name__)
logger.setLevel(level=logging.DEBUG)
coloredlogs.install(level="DEBUG", logger=logger)
# Init the config reader
config = configparser.ConfigParser()