/*!
\private
Writes a debug log message.
13755
function write( $string, $verbosityLevel = self::LEVEL_NOTICE, $label = "", $backgroundClass = "", $alwaysLog = false )
    {
        $enabled = eZDebug::isDebugEnabled();
        if ( !$alwaysLog and !$enabled )
            return;
        switch ( $verbosityLevel )
        {
            case self::LEVEL_NOTICE:
            case self::LEVEL_WARNING:
            case self::LEVEL_ERROR:
            case self::LEVEL_DEBUG:
            case self::LEVEL_TIMING_POINT:
            case self::LEVEL_STRICT:
                break;

            default:
                $verbosityLevel = self::LEVEL_ERROR;
            break;
        }
        if ( $this->MessageOutput & self::OUTPUT_MESSAGE_SCREEN and $enabled )
        {
            print( "$verbosityLevel: $string ($label)\n" );
        }
        $files = $this->logFiles();
        $fileName = false;
        if ( isset( $files[$verbosityLevel] ) )
            $fileName = $files[$verbosityLevel];
        if ( $this->MessageOutput & self::OUTPUT_MESSAGE_STORE or $alwaysLog )
        {
            if ( ! eZDebug::isLogOnlyEnabled() and $enabled )
            {
                $ip = eZSys::clientIP();
                if ( !$ip )
                    $ip = eZSys::serverVariable( 'HOSTNAME', true );
                $this->DebugStrings[] = array( "Level" => $verbosityLevel,
                                               "IP" => $ip,
                                               "Time" => time(),
                                               "Label" => $label,
                                               "String" => $string,
                                               "BackgroundClass" => $backgroundClass );
            }

            if ( $fileName !== false )
            {
                $timePoints = $this->TmpTimePoints[$verbosityLevel];
                if ( is_array( $timePoints ) )
                {
                    if ( $this->isLogFileEnabled( $verbosityLevel ) )
                    {
                        foreach ( $timePoints as $tp )
                        {
                            $desc = "Timing Point: " . $tp["Description"];
                            $this->writeFile( $fileName, $desc, $verbosityLevel, $alwaysLog );
                        }
                    }
                    $this->TmpTimePoints[$verbosityLevel] = false;
                }
                if ( $this->isLogFileEnabled( $verbosityLevel ) )
                {
                    $string = "$label:\n$string";
                    $this->writeFile( $fileName, $string, $verbosityLevel, $alwaysLog );
                }
            }
        }
    }
633160
function writeLog(levelName, varArgs) {       // eslint-disable-line no-unused-vars

          const args = [].slice.call(arguments);
          args.splice(0, 1);

          const str = format(new Date(), levelName, label, args);
          if (LEVELS[levelName] <= LEVELS.warn) {
              outputFunctions.error(str);
          } else {
              outputFunctions.log(str);
          }
      }
392796
function writeLog(msgs){
    var data = (msgs.length === 1) ? msgs[0] : msgs;
    
    this.config.callback(data);
}
1282478
public function debug(string $msg) {
		if ($this->level > self::DEBUG)
			return;
		$this->write('DEB', $msg);
	}
270781
function () {
        var prefix = 'DEBUG';
        this.output(prefix, prefix.blue, Array.prototype.slice.call(arguments));
    }
808569
function _log(type, message){
		var _debugger = $('div.lcars-debug pre');
		if( type == 'log' ){
			var message = '<span style="background:transparent;color:black">'+message+'</span>';
			_debugger.append(message+'<br>');
		}
		else if( type == 'warning' ){
			var message = '<span style="background:orange;color:black;">'+message+'</span>';
			_debugger.append(message+'<br>');
		}
		else if( type == 'error' ){
			var message = '<span style="background:#f00;color:white;font-weight:bold;">'+message+'</span>';
			_debugger.append(message+'<br>');
		}
		else if( type == 'info' ){
			var message = '<span style="background:#99f;color:white;">'+message+'</span>';
			_debugger.append(message+'<br>');
		}
		else{
			_debugger.append('<span style="background:#f00;color:white;font-weight:bold;">Unknown!</span><br>');
		}
}
717704
function debug() {
  var args = [LEVELS.DEBUG].concat(slice.apply(arguments));
  return this.log.apply(this, args);
}
604323
public void debug(String msg, Throwable e) {
        doLog(msg, LOG_DEBUG, null, e);
    }
1072844
public function debug($message)
    {
        if ( ! $this->getOutput()->isDebug()) {
            return null;
        }

        if (func_num_args() > 1) {
            $message = vsprintf($message, array_slice(func_get_args(), 1));
        }

        $this->getOutput()->writeln($message);
    }
284489
public function debug($message)
    {
        $prefix = date('c') . ': ';

        if ($this->sections) {
            $prefix .= '[' . end($this->sections) . '] ';
        }

        fwrite(STDERR, $prefix . $message . "\n");
    }
738697
function writeToLog(level, msg)
    {
        var displayPrefix = "PK-" + pkGuid + ": ";
        if(loggingMechanism && logUserObject)
        {
            loggingMechanism.addLog(level, displayPrefix + msg, logUserObject);
        }
        else
        {
            console.log(displayPrefix + msg);
        }
    }
789878
public static function debug($message = '', array $data = [], $is_replace = false, $modular = 'unknown_module')
    {
        return parent::log('debug', $message, $data, $is_replace, $modular);
    }
401600
function printDebugWithCode(msg, code) {
  // eslint-disable-next-line no-console
  console.log(`\n\n${msg}:\n`);
  // eslint-disable-next-line no-console
  console.log(`${highlightFn(code)}\n`);
}
1336250
function debug($str, $TYPE = 0, $file = "", $line = 0)
    {
        if ($this->debug)
        {
            echo "<br>[$file:$line:" . ($this->getDiffTime()) . "]$str";
            flush();
            if ($TYPE == 1)
            {
                exit;
            }
        }
    }
347031
function _log() {
  var args = Array.prototype.slice.call(arguments, 0),
    level = args.shift();

  if (!~['log', 'error', 'warn'].indexOf(level)) {
    args.unshift(level);
    level = 'log';
  }

  if (level == 'log') {
    args[0] = '----> ' + args[0];
  } else if (level == 'error') {
    args[0] = '....> ' + colors.red('ERROR: ') + args[0];
  } else if (level == 'warn') {
    args[0] = '....> ' + colors.yellow('WARNING: ') + args[0];
  }

  console[level].apply(console, args);
}
682516
private function debugLog($message)
    {
        $this->debug_log_handler !== null && is_callable($this->debug_log_handler) && call_user_func($this->debug_log_handler, $message);
    }
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;
            }
        }