danog / MadelineProto

Async PHP client API for the telegram MTProto protocol
https://docs.madelineproto.xyz
GNU Affero General Public License v3.0
2.8k stars 636 forks source link

How to hide all logs #1368

Closed arall closed 1 year ago

arall commented 1 year ago

I'm building a CMD tool and it seems I cannot hide all the console output logs from Madeline.

I've tried with:

$me = $this->client->getSelf();
$this->client->logger($me, 0);

as well as:

use danog\MadelineProto\Logger;
use danog\MadelineProto\Settings\Logger as LoggerSettings;

$settings = (new LoggerSettings)
    ->setLevel(0);
$MadelineProto->updateSettings($settings);

But doesn't seem to work.

arall commented 1 year ago

I just saw that is a duplicated of https://github.com/danog/MadelineProto/issues/621.

danog commented 1 year ago

You can log to file: https://docs.madelineproto.xyz/docs/LOGGING.html

arall commented 1 year ago

That doesn't seem to work, see my message.