This function will be invoked by any log() method in backup/restore, acting
as a simple forwarder to the standard loggers but also, if the $display
parameter is true, supporting translation via get_string() and sending to
standard output.
166981
static public function log($message, $level, $a, $depth, $display, $logger) {
        // Send to standard loggers
        $logmessage = $message;
        $options = empty($depth) ? array() : array('depth' => $depth);
        if (!empty($a)) {
            $logmessage = $logmessage . ' ' . implode(', ', (array)$a);
        }
        $logger->process($logmessage, $level, $options);

        // If $display specified, send translated string to output_controller
        if ($display) {
            output_controller::get_instance()->output($message, 'backup', $a, $depth);
        }
    }
393511
function notice( $string = false, $addEOL = true )
    {
        fputs( STDERR, $string );
        if ( $addEOL )
            fputs( STDERR, $this->endlineString() );
    }
156037
private function debug($str)
        {
            $this->log($str);
            if ($this->debug == true) {
                if (PHP_SAPI != 'cli') {
                    $str = '<br/><pre>' . htmlspecialchars($str) . '</pre>';
                }
                echo "\n" . $str;
            }
        }
154707
public function outputPlaintext()
    {
        echo str_repeat('=', 100) . "\n";
        echo $this->_backtrace[0]['file'] . ':' . $this->_backtrace[1]['function'] . ':' . $this->_backtrace[0]['line'] . "\n";
        echo str_repeat('-', 100) . "\n";
        echo self::dump($this->_var, $this->_depth, false);
        echo str_repeat('=', 100) . "\n";
    }
702034
@SuppressWarnings("unused") // expose utility check method to subclasses
    protected FormValidation checkDisplayName(@Nonnull View view, @CheckForNull String value) {
        if (StringUtils.isBlank(value)) {
            // no custom name, no need to check
            return FormValidation.ok();
        }
        for (View v: view.owner.getViews()) {
            if (v.getViewName().equals(view.getViewName())) {
                continue;
            }
            if (StringUtils.equals(v.getDisplayName(), value)) {
                return FormValidation.warning(Messages.View_DisplayNameNotUniqueWarning(value));
            }
        }
        return FormValidation.ok();
    }
814527
public function dump($return = false){
		$sql = PHP_SAPI === 'cli'
			? preg_replace('/\s+/', ' ', $this->parse()) . "\n"
			: Manager::highlightSql($this->parse());
		if(!$return)
			echo $sql;
		return $return ? $sql : $this;
	}
1296025
@Override
  protected void deliverLog(String msg)
  {
    synchronized (_os) {
      try {
        _os.print(msg);
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
595338
public function info($string, $verbosity = null)
    {
        if ($this->display) {
            parent::info($string, $verbosity);
        }
    }
138575
public static function log( $log ) {
	
		if ( ! self::is_debug() ) {
			return;
		}

		if ( is_bool( $log ) ) {
			$log = $log ? 'true' : 'false';
		}

		/**
		 * __FILE__
		 * __LINE__
		 * https://stackoverflow.com/questions/1252529/get-code-line-and-file-thats-executing-the-current-function-in-php
		 */
		$bt = debug_backtrace();
		$caller = array_shift( $bt );

		error_log( print_r( $caller['file'] . ' Line: ' . $caller['line'], true ) );
		error_log( print_r( $log, true ) );

		// if ( is_array( $log ) || is_object( $log ) ) {
		//  error_log( print_r( $log, true ) );
		// } else {
		//  error_log( $log );
		// }

	}
207044
static function set_error_display( $handler ){
		if( ! is_callable($handler) ){
			trigger_error( 'Error display handler is not callable ('.var_export($handler,1).')', E_USER_WARNING );
			return false;
		}
		PLUGError::$displayfunc = $handler;
		return true;
	}
721734
def recon_display= (new_val)
      return nil if @recon_display == new_val
      raise JSS::InvalidDataError, "recon_display must be a string, one of: #{RECON_DISPLAY_CHOICES.join(", ")}" unless RECON_DISPLAY_CHOICES.include? new_val
      @recon_display = new_val
      @need_to_update = true
    end
678428
public function getLoginUrl($scope = null, $display = null)
    {
        //argument test
        Argument::i()
            //argument 1 must be a string, array or null
            ->test(1, 'string', 'array', 'null')
            //argument 2 must be a string, array or null
            ->test(2, 'string', 'array', 'null');

        //if scope in not null
        if (!is_null($scope)) {
            //lets set the scope
            $this->setScope($scope);
        }

        //if display in not null
        if (!is_null($display)) {
            //lets set the display
            $this->setDisplay($display);
        }

        //populate fields
        $query = array(
          'response_type' => $this->responseType,
          'client_id' => $this->client,
          'redirect_uri' => $this->redirect);

        return $this->generateLoginUrl($query);

    }
1336250
function debug($str, $TYPE = 0, $file = "", $line = 0)
    {
        if ($this->debug)
        {
            echo "<br>[$file:$line:" . ($this->getDiffTime()) . "]$str";
            flush();
            if ($TYPE == 1)
            {
                exit;
            }
        }
    }
702119
def print
      return unless $stdout.tty?
      return if recently_fetched?

      resp = fetch_server_message
      update_fetched
      puts resp unless resp.empty?
    end
1199704
public static function backtrace($returnVal = false, $ignoreAjax = false, $ignoredFunctions = null)
    {
        $plainText = Director::is_cli() || (Director::is_ajax() && !$ignoreAjax);
        $result = self::get_rendered_backtrace(debug_backtrace(), $plainText, $ignoredFunctions);
        if ($returnVal) {
            return $result;
        } else {
            echo $result;
            return null;
        }
    }
406360
public function print_nothing_to_display() {
        global $OUTPUT;
        echo $this->render_reset_button();
        $this->print_initials_bar();
        if (!empty($this->statuses) || !empty($this->types)) {
            $message = get_string('nodatarequestsmatchingfilter', 'tool_dataprivacy');
        } else {
            $message = get_string('nodatarequests', 'tool_dataprivacy');
        }
        echo $OUTPUT->notification($message, 'warning');
    }
1326074
def DisplayGetter(accessor, *args, **kwargs):
    
    short_description = get_pretty_name(accessor)
    accessor = 'get_%s_display' % accessor
    getter = Getter(accessor, *args, **kwargs)
    getter.short_description = short_description
    return getter