The function that receives the actual debug information.

@returns {Boolean} indication that we're logging.
@public
549011
function diagnostics() {
    var args = Array.prototype.slice.call(arguments, 0);

    write.call(write, options, process(args, options));
    return true;
  }
224912
function(opts) {
  opts = opts || {};

  this.options = {
    debug: opts.debug || false,
    board: opts.board || 'uno',
    port: opts.port || '',
    manualReset: opts.manualReset || false
  };

  // this here checks for 3 conditions:
  // if debug option is simply true, we want to fall back to default debug function
  // if a custom debug function is passed in, we want to assign debug to be that
  // if debug option is false, then run debug as a no-op
  if (this.options.debug === true) {
    this.debug = console.log.bind(console);
  } else if (typeof this.options.debug === 'function') {
    this.debug = this.options.debug;
  } else {
    this.debug = function() {};
  }

  if (typeof this.options.board === 'string') {
    this.options.board = boards[this.options.board];
  } else if (typeof this.options.board === 'object') {
    this.options.board = this.options.board;
  }

  if (this.options.board && !this.options.board.manualReset) {
    this.options.board.manualReset = this.options.manualReset;
  }

  this.connection = new Connection(this.options);

  if (this.options.board) {
    var Protocol = protocols[this.options.board.protocol] || function() {};

    this.protocol = new Protocol({
      board: this.options.board,
      connection: this.connection,
      debug: this.debug
    });
  }
}
19423
def debug(self, on: bool = True) -> None:
        
        if on:
            self.send_line("debug on")
        else:
            self.send_line("debug off")
1361266
function log() {
      var defaultCount = 2,
          console = isHostType(context, 'console') && context.console,
          document = isHostType(context, 'document') && context.document,
          phantom = isHostType(context, 'phantom') && context.phantom,
          JSON = isHostType(context, 'JSON') && _.isFunction(context.JSON && context.JSON.stringify) && context.JSON;

      // Lazy define `log`.
      log = function(type, message, value) {
        var argCount = defaultCount,
            method = 'log';

        if (type == 'error') {
          argCount = 1;
          if (isHostType(console, type)) {
            method = type;
          } else {
            message = type + ': ' + message;
          }
        }
        // Avoid logging if in debug mode and running from the CLI.
        if (!isDebug || (document && !phantom)) {
          // Because `console.log` is a host method we don't assume `apply` exists.
          if (argCount < 2) {
            if (JSON) {
              value = [JSON.stringify(value), value];
              value = value[0] == 'null' ? value[1] : value[0];
            }
            console[method](message + (type == 'error' ? '' : ' ' + value));
          } else {
            console[method](message, value);
          }
        }
      };

      // For Rhino or RingoJS.
      if (!console && !document && _.isFunction(context.print)) {
        console = { 'log': print };
      }
      // Use noop for no log support.
      if (!isHostType(console, 'log')) {
        log = function() {};
      }
      // Avoid Safari 2 crash bug when passing more than 1 argument.
      else if (console.log.length == 1) {
        defaultCount = 1;
      }
      return log.apply(null, arguments);
    }
6717
public function logDebug()
  {
    if ($this->getVerbosity()>=OutputInterface::VERBOSITY_DEBUG)
    {
      $args   = func_get_args();
      $format = array_shift($args);

      $this->writeln(vsprintf('<info>'.$format.'</info>', $args));
    }
  }
233957
@SuppressWarnings("unchecked") 
   private static boolean isDebugEnabled()
   {
      if (logging != null)
      {
         try
         {
            Class<?> clz = logging.getClass();
            Method mIsDebugEnabled = clz.getMethod("isDebugEnabled", (Class[])null);
            return ((Boolean)mIsDebugEnabled.invoke(logging, (Object[])null)).booleanValue();
         }
         catch (Throwable t)
         {
            // Nothing we can do
         }
      }
      return true;
   }
10753
function dev() {
  return function logger(ctx, next) {
    // request
    const start = new Date();
    /* eslint no-console: 0 */
    console.log(`  ${chalk.gray('<--')} ${chalk.bold(ctx.method)} ${chalk.gray(ctx.originalUrl)}`);


    // calculate the length of a streaming response
    // by intercepting the stream with a counter.
    // only necessary if a content-length header is currently not set.
    const length = ctx.response.length;
    const body = ctx.body;
    let counter;
    if ((length === null || length === undefined) && body && body.readable) {
      /* eslint no-param-reassign: 0 */
      ctx.body = body
        .pipe(counter = new Counter())
        .on('error', ctx.onerror);
    }

    // log when the response is finished or closed,
    // whichever happens first.
    const res = ctx.res;
    const onfinish = done.bind(null, 'finish');
    const onclose = done.bind(null, 'close');
    /* eslint no-use-before-define: 0 */
    function done(event) {
      res.removeListener('finish', onfinish);
      res.removeListener('close', onclose);
      log(ctx, start, counter ? counter.length : length, null, event);
    }

    res.once('finish', onfinish);
    res.once('close', onclose);
    return next();
  };
}
1362340
function Logger(name) {
    var prjName = module.exports.PROJECT_NAME;
    this.name = prjName ? prjName + ':' + name : name;
    this._debug = debug(this.name);
    this._debug.log = logDebug;
    this.debugEnabled = debug.enabled(this.name);
    if (this.debugEnabled) {
        logDebug('[%s] debug is %s', this.name.blue, 'ENABLED'.green);
    }
}
411562
function verifyLoggingCallbacks() {
	var loggingCallback, userCallback;

	for ( loggingCallback in loggingCallbacks ) {
		if ( QUnit[ loggingCallback ] !== loggingCallbacks[ loggingCallback ] ) {

			userCallback = QUnit[ loggingCallback ];

			// Restore the callback function
			QUnit[ loggingCallback ] = loggingCallbacks[ loggingCallback ];

			// Assign the deprecated given callback
			QUnit[ loggingCallback ]( userCallback );

			if ( window.console && window.console.warn ) {
				window.console.warn(
					"QUnit." + loggingCallback + " was replaced with a new value.\n" +
					"Please, check out the documentation on how to apply logging callbacks.\n" +
					"Reference: http://api.qunitjs.com/category/callbacks/"
				);
			}
		}
	}
}
479522
function log(msg) {
        if (msg === void 0) { msg = ""; }
        return action(function (p) { console.log(msg); }).setType("log");
    }
1224202
function logger() {
  if (hasGulplog()) {
    // specifically deferring loading here to keep from registering it globally
    var gulplog = require('gulplog');
    gulplog.info.apply(gulplog, arguments);
  } else {
    // specifically defering loading because it might not be used
    var fancylog = require('fancy-log');
    fancylog.apply(null, arguments);
  }
}
716487
function debugConfig()
    {
	    $jname = $this->getJname();
	    //get registration status
	    $new_registration = $this->allowRegistration();

	    if ($new_registration) {
		    $plugins = Framework::getSlaves();
		    foreach ($plugins as $plugin) {
			    if ($plugin->name == $jname) {
				    Framework::raise(LogLevel::NOTICE, Text::_('DISABLE_REGISTRATION'), $jname);
			    }
		    }
	    } else {
		    $master = Framework::getMaster();
		    if ($master && $master->name == $jname) {
			    Framework::raise(LogLevel::NOTICE, Text::_('ENABLE_REGISTRATION'), $jname);
		    }
	    }

	    //most dual login problems are due to incorrect cookie domain settings
	    //therefore we should check it and output a warning if needed.

	    $cookie_domain = $this->params->get('cookie_domain',-1);
	    if ($cookie_domain!==-1) {
		    $cookie_domain = str_replace(array('http://', 'https://'), array('', ''), $cookie_domain);
		    $correct_array = explode('.', html_entity_decode($_SERVER['SERVER_NAME']));

		    //check for domain names with double extentions
		    if (isset($correct_array[count($correct_array) - 2]) && isset($correct_array[count($correct_array) - 1])) {
			    //domain array
			    $domain_array = array('com', 'net', 'org', 'co', 'me');
			    if (in_array($correct_array[count($correct_array) - 2], $domain_array)) {
				    $correct_domain = '.' . $correct_array[count($correct_array) - 3] . '.' . $correct_array[count($correct_array) - 2] . '.' . $correct_array[count($correct_array) - 1];
			    } else {
				    $correct_domain = '.' . $correct_array[count($correct_array) - 2] . '.' . $correct_array[count($correct_array) - 1];
			    }
			    if ($correct_domain != $cookie_domain && !$this->allowEmptyCookieDomain()) {
				    Framework::raise(LogLevel::NOTICE, Text::_('BEST_COOKIE_DOMAIN') . ' ' . $correct_domain, $jname);
			    }
		    }
	    }

	    //also check the cookie path as it can interfere with frameless
	    $cookie_path = $this->params->get('cookie_path',-1);
	    if ($cookie_path !== -1) {
		    if ($cookie_path != '/' && !$this->allowEmptyCookiePath()) {
			    Framework::raise(LogLevel::NOTICE, Text::_('BEST_COOKIE_PATH') . ' /', $jname);
		    }
	    }

	    // allow additional checking of the configuration
	    $this->debugConfigExtra();
    }
309110
public static function isDebug()
    {

        $result = self::$enabled;
        if ($result) {

            if (self::$_config['personal']['ip']) {

                if (is_array(self::$_config['personal']['ip'])) {
                    $result = in_array(self::getClientIP(), self::$_config['personal']['ip']);

                } else {
                    $result = self::getClientIP() == self::$_config['personal']['ip'];

                }

            }

            if (self::$_config['personal']['requestParam'] && $result) {

                if (isset($_REQUEST[self::$_config['personal']['requestParam']])
                    &&
                    $_REQUEST[self::$_config['personal']['requestParam']] == self::$_config['personal']['requestValue']
                ) {
                    $result = true;
                } else {
                    $result = false;
                }
            }

        }

        return $result;
    }
788070
function debug() {
  return fritz.getDeviceList().then(function(devices) {
    console.log("Raw devices\n");
    console.log(devices);
  });
}
240814
protected function isDebug()
    {
        if (($this->debugOverride && !$this->debug) || (!$this->debugOverride && !static::$staticDebug)) {
            return false;
        }

        if ($this->debugOverride && $this->debug) {
            return $this->debug;
        }

        return static::$staticDebug;
    }
437209
function(debug, milliseconds)
{

    if(debug == null)
    {
        this_debug = false;
    }
    else
    {
        this._debug = debug;
    }

    if(milliseconds == null)
    {
        this._milliseconds = false;
    }
    else
    {
        this._milliseconds = true;
    }


}
884736
def showLogging(debug=False):
    

    try:
        log_level = logging.WARN
        log_format = LOG_FORMAT_DEBUG
        if debug:
            log_level = logging.DEBUG
        logging.basicConfig(
            level=log_level,
            format=log_format)
    except:
        logging.basicConfig()