less logs

This commit is contained in:
andrea
2025-07-27 00:07:20 +02:00
parent b9161a052f
commit c82f31a101

View File

@@ -43,7 +43,7 @@ async def show_logs(update, context):
try: try:
game_log= _os.path.expanduser(f'{_botsyms.BOT_PATH}/{_log.get_log_name()}') game_log= _os.path.expanduser(f'{_botsyms.BOT_PATH}/{_log.get_log_name()}')
with open(game_log, 'r') as _log_file: with open(game_log, 'r') as _log_file:
lines= _log_file.readlines()[-30:] lines= _log_file.readlines()[-20:]
log_content= '\n'.join(lines) log_content= '\n'.join(lines)
await update.message.reply_text(f"Contenuto del log:\n{log_content}") await update.message.reply_text(f"Contenuto del log:\n{log_content}")
except Exception as e: except Exception as e: