Exemplo n.º 1
0
 /**
  * Flush any pending log messages to the logging handler.
  *
  * This method is intended to be registered as a shutdown handler, so that any pending messages that weren't sent
  * to the logging handler at that point, can still make it. It is therefore not intended to be called manually.
  *
  */
 public static function flush()
 {
     $s = \SimpleSAML_Session::getSessionFromRequest();
     self::$trackid = $s->getTrackID();
     self::$shuttingDown = true;
     foreach (self::$earlyLog as $msg) {
         self::log($msg['level'], $msg['string'], $msg['statsLog']);
     }
 }
Exemplo n.º 2
0
 /**
  * Flush any pending log messages to the logging handler.
  *
  * This method is intended to be registered as a shutdown handler, so that any pending messages that weren't sent
  * to the logging handler at that point, can still make it. It is therefore not intended to be called manually.
  *
  */
 public static function flush()
 {
     try {
         $s = \SimpleSAML_Session::getSessionFromRequest();
     } catch (\Exception $e) {
         // loading session failed. We don't care why, at this point we have a transient session, so we use that
         self::error('Cannot load or create session: ' . $e->getMessage());
         $s = \SimpleSAML_Session::getSessionFromRequest();
     }
     self::$trackid = $s->getTrackID();
     self::$shuttingDown = true;
     foreach (self::$earlyLog as $msg) {
         self::log($msg['level'], $msg['string'], $msg['statsLog']);
     }
 }