Skip to content

Commit

Permalink
[Audio] Enable logging on Lavalink V3 (#2438)
Browse files Browse the repository at this point in the history
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
  • Loading branch information
Tobotimus committed Feb 10, 2019
1 parent b9d440f commit dae7552
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 1 addition & 3 deletions redbot/__init__.py
Expand Up @@ -118,9 +118,7 @@ def to_json(self) -> _Dict[str, _Union[int, str]]:
"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(
Expand Down
2 changes: 1 addition & 1 deletion redbot/cogs/audio/__init__.py
Expand Up @@ -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")
Expand Down
8 changes: 8 additions & 0 deletions redbot/cogs/audio/data/application.yml
Expand Up @@ -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
4 changes: 2 additions & 2 deletions redbot/core/events.py
Expand Up @@ -5,15 +5,15 @@
import logging
import traceback
from datetime import timedelta
from typing import List

import aiohttp
import discord
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
Expand Down

0 comments on commit dae7552

Please sign in to comment.