Log when an output file is too large
This commit is contained in:
parent
81fa1454ed
commit
60e4ed5570
1 changed files with 6 additions and 0 deletions
|
@ -113,6 +113,12 @@ class AutoResponder(commands.Cog):
|
||||||
if file:
|
if file:
|
||||||
if _p.stat().st_size <= 24.5 * 1024 * 1024:
|
if _p.stat().st_size <= 24.5 * 1024 * 1024:
|
||||||
await message.reply(file=file)
|
await message.reply(file=file)
|
||||||
|
else:
|
||||||
|
self.log.warning(
|
||||||
|
"Transcoded file too large: %r (%.2f)MB",
|
||||||
|
_p,
|
||||||
|
_p.stat().st_size / 1024 / 1024
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.error("Failed to transcode %r: %r", link, e)
|
self.log.error("Failed to transcode %r: %r", link, e)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue