/** * Sets logger instance. * * @param ILogger $loggerObj Logger instance. * @throws Exception If Logger is null. */ public static function setLogger(ILogger $loggerObj) { if ($loggerObj == null) { throw new Exception("Logger cannot be null."); } ExceptionHandler::$logger = $loggerObj; }