From 06e347ca852c18b436e812304f35bda2b4d20176 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 12 Jul 2020 11:42:53 +0200 Subject: [PATCH] Move logs --- src/danog/MadelineProto/Logger.php | 2 +- src/danog/MadelineProto/MTProto.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/Logger.php b/src/danog/MadelineProto/Logger.php index 8f944b08..62094413 100644 --- a/src/danog/MadelineProto/Logger.php +++ b/src/danog/MadelineProto/Logger.php @@ -228,8 +228,8 @@ class Logger $this->stdout = null; \unlink($this->optional); $this->stdout = new ResourceOutputStream(\fopen($this->optional, 'a')); + $this->logger("Automatically truncated logfile to $max_size"); } - $this->logger("Automatically truncated logfile to $max_size"); } ); Loop::unreference($this->rotateId); diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index d6e2b3ee..ab28a5f0 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -1317,7 +1317,7 @@ class MTProto extends AsyncConstruct implements TLCallback 'logger' => (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') ? Logger::ECHO_LOGGER : Logger::FILE_LOGGER, // overwrite previous setting and echo logs 'logger_level' => Logger::VERBOSE, - 'max_size' => 10 * 1024 * 1024, + 'max_size' => 1 * 1024 * 1024, // Logging level, available logging levels are: ULTRA_VERBOSE, VERBOSE, NOTICE, WARNING, ERROR, FATAL_ERROR. Can be provided as last parameter to the logging function. ], 'max_tries' => [ 'query' => 5,