------------------------------------------------------------------------- Log
358309
@Override
	public void log(com.silentgo.utils.log.level.Level level, String format, Object... arguments) {
		log(level, null, format, arguments);
	}
380949
private void initXlog() {
    LogConfiguration config = new LogConfiguration.Builder()
        .logLevel(BuildConfig.DEBUG ? LogLevel.ALL             // Specify log level, logs below this level won't be printed, default: LogLevel.ALL
            : LogLevel.NONE)
        .tag(getString(R.string.global_tag))                   // Specify TAG, default: "X-LOG"
        // .t()                                                // Enable thread info, disabled by default
        // .st(2)                                              // Enable stack trace info with depth 2, disabled by default
        // .b()                                                // Enable border, disabled by default
        // .jsonFormatter(new MyJsonFormatter())               // Default: DefaultJsonFormatter
        // .xmlFormatter(new MyXmlFormatter())                 // Default: DefaultXmlFormatter
        // .throwableFormatter(new MyThrowableFormatter())     // Default: DefaultThrowableFormatter
        // .threadFormatter(new MyThreadFormatter())           // Default: DefaultThreadFormatter
        // .stackTraceFormatter(new MyStackTraceFormatter())   // Default: DefaultStackTraceFormatter
        // .borderFormatter(new MyBoardFormatter())            // Default: DefaultBorderFormatter
        // .addObjectFormatter(AnyClass.class,                 // Add formatter for specific class of object
        //     new AnyClassObjectFormatter())                  // Use Object.toString() by default
        .addInterceptor(new BlacklistTagsFilterInterceptor(    // Add blacklist tags filter
            "blacklist1", "blacklist2", "blacklist3"))
        // .addInterceptor(new WhitelistTagsFilterInterceptor( // Add whitelist tags filter
        //     "whitelist1", "whitelist2", "whitelist3"))
        // .addInterceptor(new MyInterceptor())                // Add a log interceptor
        .build();

    Printer androidPrinter = new AndroidPrinter();             // Printer that print the log using android.util.Log
    Printer filePrinter = new FilePrinter                      // Printer that print the log to the file system
        .Builder(new File(Environment.getExternalStorageDirectory(), "xlogsample").getPath())       // Specify the path to save log file
        .fileNameGenerator(new DateFileNameGenerator())        // Default: ChangelessFileNameGenerator("log")
        // .backupStrategy(new MyBackupStrategy())             // Default: FileSizeBackupStrategy(1024 * 1024)
        // .cleanStrategy(new FileLastModifiedCleanStrategy(MAX_TIME))     // Default: NeverCleanStrategy()
        .flattener(new ClassicFlattener())                     // Default: DefaultFlattener
        .build();

    XLog.init(                                                 // Initialize XLog
        config,                                                // Specify the log configuration, if not specified, will use new LogConfiguration.Builder().build()
        androidPrinter,                                        // Specify printers, if no printer is specified, AndroidPrinter(for Android)/ConsolePrinter(for java) will be used.
        filePrinter);

    // For future usage: partial usage in MainActivity.
    globalFilePrinter = filePrinter;
  }
27989
private void log(ArrayList<PrintWriter> writers, RecordTypes recordType,
                   Keys[] keys, String[] values) {
    log(writers, recordType, keys, values, false);
  }
110439
function (logInst) {

	var log_id = logInst.id;

	// create index to buffer map, if not exist
	if (l_logBufferIdxByID.hasOwnProperty(log_id) === false)
		l_logBufferIdxByID[log_id] = [];

	l_logBufferIdxByID[log_id].push(logInst);

	l_logBuffer.enqueue(logInst,

		// callback to write log
		function (tmpLog) {

			// show notice if queued log exceeds limit (once each time multiples of the limit is reached)
			if ((l_logBuffer.getLength() > 0) && (l_logBuffer.getLength() % l_logBufferOverloadLimit === 0)) {
				console.log(l_name + '::l_writeLog::' + SR.Tags.YELLOW + 'log len=' + l_logBuffer.getLength() + SR.Tags.ERREND);
			}

			// lock individual log instance            
			if (l_logs.hasOwnProperty(tmpLog.id) === true) {
				// if we're busy writing now, wait till next time
				if (l_logs[tmpLog.id].writing === true)
					return false;

				// lock the writing for this id
				l_logs[tmpLog.id].writing = true;

				SR.fs.writeSync(tmpLog.fd, tmpLog.msg, undefined, undefined);

				// remove a flag record from topmost
				if (l_logBufferIdxByID.hasOwnProperty(tmpLog.id) === true)
					l_logBufferIdxByID[tmpLog.id].shift();

				l_logs[tmpLog.id].writing = false;
			}

			// NOTE: processing will pause here if id doesn't exist in l_logs
			// TODO: right behavior?
			return true;
		}
	);
}
637320
private void prepareLogger(String verboseLog) {
        final StaticLoggerBinder loggerBinder = StaticLoggerBinder.getSingleton();
        final LoggerContext context = (LoggerContext) loggerBinder.getLoggerFactory();

        final PatternLayoutEncoder encoder = new PatternLayoutEncoder();
        encoder.setPattern("%d %C:%L%n%-5level - %msg%n");
        encoder.setContext(context);
        encoder.start();
        final FileAppender<ILoggingEvent> fa = new FileAppender<>();
        fa.setAppend(true);
        fa.setEncoder(encoder);
        fa.setContext(context);
        fa.setFile(verboseLog);
        final File f = new File(verboseLog);
        String name = f.getName();
        final int i = name.lastIndexOf('.');
        if (i > 1) {
            name = name.substring(0, i);
        }
        fa.setName(name);
        fa.start();
        final ch.qos.logback.classic.Logger rootLogger = context.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
        rootLogger.setLevel(Level.DEBUG);
        final ThresholdFilter filter = new ThresholdFilter();
        filter.setLevel(LogLevel.INFO.getValue());
        filter.setContext(context);
        filter.start();
        rootLogger.iteratorForAppenders().forEachRemaining(action -> {
            action.addFilter(filter);
        });
        rootLogger.addAppender(fa);
    }
1276304
public static void debug(Logger log, String methodName) {
        if (log.isDebugEnabled())
            log.debug(buildMethodLogString(methodName));
    }
286444
function log(patch) {
		var mw = (patch || core.base());
		mw.enabled = true;
		// let's be gentle
		if (console) {
			mw.writeln = function (str) {
				if (mw.enabled) {
					console.log(String(str));
				}
			};
		}
		else {
			mw.writeln = function (/*str*/) {
				// ignore?
			};
		}
		if (!patch) {
			mw.toString = function () {
				return '<miniwrite-log>';
			};
		}
		return mw;
	}
1259089
function _logExecOutput(log, process) {
  let stdout = process.stdout || '';
  let stderr = process.stderr || '';

  if (process.platform === 'win32') {
    stdout = stdout.replace(/\r\n/g, '\n');
    stderr = stderr.replace(/\r\n/g, '\n');
  }

  if (stdout) {
    log.trace({ event: 'EXEC_SUCCESS', stdout: true }, stdout);
  }

  if (stderr) {
    log.trace({ event: 'EXEC_SUCCESS', stderr: true }, stderr);
  }

  if (!stdout && !stderr) {
    log.trace({ event: 'EXEC_SUCCESS' }, '');
  }
}
384234
function logs(a) {
  return a.isIgnored?         ''
  :      a.log.length === 0?  ''
  :      /* otherwise */      '\n' + pad( 2
                                        , '=== Captured logs:\n'
                                        + a.log.map(function(x){
                                            return faded('- ' + show(x.log))})
                                          .join('\n') + '\n---\n')
}
525979
public void log(final LogNode log) {
        if (log != null) {
            final LogNode scanSpecLog = log.log("ScanSpec:");
            for (final Field field : ScanSpec.class.getDeclaredFields()) {
                try {
                    scanSpecLog.log(field.getName() + ": " + field.get(this));
                } catch (final ReflectiveOperationException e) {
                    // Ignore
                }
            }
        }
    }
1354272
void log(HttpRequest request,
             HttpResponse response,
             int length)
    {
        if (_requestLog!=null &&
            request!=null &&
            response!=null)
            _requestLog.log(request,response,length);
    }
1033827
def log(self, level, *args, **kwargs):
        """"""
        return self._log_kw(level, args, kwargs)
718763
function log() {
  var _console;

  return Postmate.debug ? (_console = console).log.apply(_console, arguments) : null;
}
802645
function log () {
    if (argv.stdin && argv.fix) {
      arguments[0] = opts.cmd + ': ' + arguments[0]
      console.error.apply(console, arguments)
    } else {
      console.log.apply(console, arguments)
    }
  }
522678
def log(self, *args):
        """"""
        print("%s %s" % (str(self).ljust(8), " ".join([str(x) for x in args])))
1063734
public void log(AccessLog log) throws Exception {
        if (log == null) {
            return;
        }
        executorService.submit(new LogTask(log));
    }
1152185
@Override
    protected void log(final String msg) {
        if (config.getLogLevel().equals(LogLevel.DEBUG)) {
            logger.debug(msg);
        } else if (config.getLogLevel().equals(LogLevel.TRACE)) {
            logger.trace(msg);
        } else if (config.getLogLevel().equals(LogLevel.INFO)) {
            logger.info(msg);
        } else if (config.getLogLevel().equals(LogLevel.WARN)) {
            logger.warn(msg);
        } else if (config.getLogLevel().equals(LogLevel.ERROR)) {
            logger.error(msg);
        }
    }