aboutsummaryrefslogtreecommitdiff
path: root/discord/opus.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-08-22 02:33:51 -0400
committerRapptz <[email protected]>2021-08-22 02:33:51 -0400
commitea2d972666364c0f8159c9166e97f1b6053e3b68 (patch)
treea81c89ed4326460e808fa3b2f347cf8102bd8156 /discord/opus.py
parentResponseType type alias is private (diff)
downloaddiscord.py-ea2d972666364c0f8159c9166e97f1b6053e3b68.tar.xz
discord.py-ea2d972666364c0f8159c9166e97f1b6053e3b68.zip
Make global log variable in modules private
Diffstat (limited to 'discord/opus.py')
-rw-r--r--discord/opus.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/discord/opus.py b/discord/opus.py
index 62628753..ef95e8d5 100644
--- a/discord/opus.py
+++ b/discord/opus.py
@@ -53,7 +53,7 @@ __all__ = (
'OpusNotLoaded',
)
-log: logging.Logger = logging.getLogger(__name__)
+_log = logging.getLogger(__name__)
c_int_ptr = ctypes.POINTER(ctypes.c_int)
c_int16_ptr = ctypes.POINTER(ctypes.c_int16)
@@ -106,14 +106,14 @@ signal_ctl: SignalCtl = {
def _err_lt(result, func, args):
if result < OK:
- log.info('error has happened in %s', func.__name__)
+ _log.info('error has happened in %s', func.__name__)
raise OpusError(result)
return result
def _err_ne(result, func, args):
ret = args[-1]._obj
if ret.value != OK:
- log.info('error has happened in %s', func.__name__)
+ _log.info('error has happened in %s', func.__name__)
raise OpusError(ret.value)
return result
@@ -192,7 +192,7 @@ def libopus_loader(name):
if item[3]:
func.errcheck = item[3]
except KeyError:
- log.exception("Error assigning check function to %s", func)
+ _log.exception("Error assigning check function to %s", func)
return lib
@@ -276,7 +276,7 @@ class OpusError(DiscordException):
def __init__(self, code):
self.code = code
msg = _lib.opus_strerror(self.code).decode('utf-8')
- log.info('"%s" has happened', msg)
+ _log.info('"%s" has happened', msg)
super().__init__(msg)
class OpusNotLoaded(DiscordException):