Пример #1
0
 public static function Output($logFile, $level, $message, $userConfig)
 {
     $minLevel = $userConfig->logFile->minLevel;
     $levelHasPermission = LevelPermissionHandler::CheckIfPermitted($level, $minLevel);
     if ($userConfig->logFile->enable == 'true' && $levelHasPermission) {
         $logItem = OutputMessageFormatter::Format($level, $message);
         file_put_contents($logFile, $logItem, FILE_APPEND);
     }
 }
Пример #2
0
 public static function Output($level, $message, $userConfig)
 {
     $minLevel = $userConfig->console->minLevel;
     $levelHasPermission = LevelPermissionHandler::CheckIfPermitted($level, $minLevel);
     if ($userConfig->console->enable == 'true' && $levelHasPermission) {
         $levelColour = Config::$LevelColours[$level];
         $logItem = OutputMessageFormatter::Format($level, $message);
         echo $levelColour . $logItem . self::$ColourTerminator;
     }
 }