initErrorLog() public static method

Initialize error log
public static initErrorLog ( string $path ) : Logger
$path string
return Monolog\Logger
 public function testErrorStream()
 {
     $file = $this->logfiles['error'];
     $this->assertFileNotExists($file);
     TelegramLog::initErrorLog($file);
     TelegramLog::error('my error');
     $this->assertFileExists($file);
     $this->assertContains('bot_log.ERROR: my error', file_get_contents($file));
 }