alexander-akhmetov / python-telegram

Python client for the Telegram's tdlib
MIT License
610 stars 122 forks source link

Disable log messages #306

Closed MaxDXDX closed 2 years ago

MaxDXDX commented 2 years ago

Hi guys!

I'd like to turn off inner colored TDLib log messages in console such as: [ 2][t 4][1660821640.573203086][AuthDataShared.cpp:107][#1][!Td] [ 2][t 4][1660821648.668215036][Td.cpp:3597][#1][!Td] Close Td in state 2 Generate new session_id 8046556961038579337 for auth key 18393559095990870397 for main DC2 and etc.

I have looked for any code in python-telegram package *.py files, but don't find any snippets that responsible for this logging messages. I found standard python logger only.

How to disable above messages?

alexander-akhmetov commented 2 years ago

Hi! You can try to set tdlib_verbosity (default: 2) to a lower value: Telegram(tdlib_verbosity=...)

MaxDXDX commented 2 years ago

Hi! You can try to set tdlib_verbosity (default: 2) to a lower value: Telegram(tdlib_verbosity=...)

Exactly what I want! I am grateful for your support, Alexander!