[Audio] Enable logging on Lavalink V3 (#2438)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2019-02-10 18:36:02 +11:00 committed by GitHub
parent b9d440f2f7
commit dae75521d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 6 deletions

View File

@ -118,9 +118,7 @@ class VersionInfo:
"dev_release": self.dev_release,
}
def __lt__(self, other: _Any) -> bool:
if not isinstance(other, VersionInfo):
return NotImplemented
def __lt__(self, other: "VersionInfo") -> bool:
tups: _List[_Tuple[int, int, int, int, int, int, int]] = []
for obj in (self, other):
tups.append(

View File

@ -34,7 +34,7 @@ async def download_lavalink(session):
async def maybe_download_lavalink(loop, cog):
jar_exists = LAVALINK_JAR_FILE.exists()
current_build = redbot.core.VersionInfo.from_json(await cog.config.current_version())
current_build = redbot.VersionInfo.from_json(await cog.config.current_version())
if not jar_exists or current_build < redbot.core.version_info:
log.info("Downloading Lavalink.jar")

View File

@ -18,3 +18,11 @@ lavalink:
sentryDsn: ""
bufferDurationMs: 400
youtubePlaylistLoadLimit: 10000
logging:
file:
max-history: 30
max-size: 1GB
path: ./logs/
level:
root: INFO
lavalink: INFO

View File

@ -5,7 +5,6 @@ import datetime
import logging
import traceback
from datetime import timedelta
from typing import List
import aiohttp
import discord
@ -13,7 +12,8 @@ import pkg_resources
from colorama import Fore, Style, init
from pkg_resources import DistributionNotFound
from . import __version__ as red_version, version_info as red_version_info, VersionInfo, commands
from .. import __version__ as red_version, version_info as red_version_info, VersionInfo
from . import commands
from .data_manager import storage_type
from .utils.chat_formatting import inline, bordered, format_perms_list
from .utils import fuzzy_command_search, format_fuzzy_results