/** * outputs entire log * * unlike flushNow, this method doesn't use and affect already-flushed marker and always shows all events * * @param int $min_level minimal event level to output * @param array $options * * @return string */ public static function flushAll($min_level = LOG_LEVEL_MESSAGE, $override_options = array()) { // if bad config was detected, do nothing if (self::$bad_config) { return false; } // temporarily change options if needed $old_options = self::$options; self::$options = array_merge(self::$options, $override_options); // iterate all lines and send them out $return = ''; foreach (self::$log as $record_id => $log_record) { $return .= self::$instance->outputOne($record_id, $min_level); } // restore options self::$options = $old_options; return $return; }