public function writer($level, $message)
    {
        (!empty($this->file)) ? $fileName = $this->file : $fileName = '.logs';
        $fileHandling = new FileHandling();
        $text = 'Date/time: '.date('Y-m-d h:i:s A')." , Level: $level , message: ".$message."\n";
        $file = route()->storage->log.$fileName;
        $fileHandling->open($file, 'readWriteAppend')->write($text);
        $fileHandling->close();
    }
public function writer($level, $message)
    {
        (!empty($this->file)) ? $fileName = $this->file : $fileName = '.logs';
        $fileHandling = new FileHandling();
        $text = 'Date/time: '.date('Y-m-d h:i:s A')." , Level: $level , message: ".$message."\n";
        $file = route()->storage->log.$fileName;
        $fileHandling->open($file, 'readWriteAppend')->write($text);
        $fileHandling->close();
    }
public function writer ( $ level , $ message ) { ( ! empty ( $ this -> file ) ) ? $ fileName = $ this -> file : $ fileName = '.logs' ; $ fileHandling = new FileHandling ( ) ; $ text = 'Date/time: ' . date ( 'Y-m-d h:i:s A' ) . " , Level: $level , message: " . $ message . "\n" ; $ file = route ( ) -> storage -> log . $ fileName ; $ fileHandling -> open ( $ file , 'readWriteAppend' ) -> write ( $ text ) ; $ fileHandling -> close ( ) ; }
Write the log message in files.

@param (string) $string  Error level (string or PHP syslog priority)
@param (string) $message Error message

@since 2.0.3

@return void
Write the log message in files .