code: private void printLog() {
      Logger.Builder builder = new Logger.Builder();
  
      String tag = tagView.getText().toString();
      if (!TextUtils.isEmpty(tag)) {
        builder.tag(tag);
      }
  
      if (threadInfo.isChecked()) {
        builder.t();
      } else {
        builder.nt();
      }
  
      if (stackTraceInfo.isChecked()) {
        builder.st(STACK_TRACE_DEPTHS[stackTraceDepth.getSelectedItemPosition()]);
      } else {
        builder.nst();
      }
  
      if (border.isChecked()) {
        builder.b();
      } else {
        builder.nb();
      }
  
      // Print the log to view, logcat and file.
      if (hasPermission) {
        builder.printers(
            viewPrinter,
            new AndroidPrinter(),
            XLogSampleApplication.globalFilePrinter);
      } else {
        builder.printers(
            viewPrinter,
            new AndroidPrinter());
      }
  
      Logger logger = builder.build();
  
      int levelPosition = levelView.getSelectedItemPosition();
      int level = LEVELS[levelPosition];
      switch (level) {
        case LogLevel.VERBOSE:
          logger.v(MESSAGE);
          break;
        case LogLevel.DEBUG:
          logger.d(MESSAGE);
          break;
        case LogLevel.INFO:
          logger.i(MESSAGE);
          break;
        case LogLevel.WARN:
          logger.w(MESSAGE);
          break;
        case LogLevel.ERROR:
          logger.e(MESSAGE);
          break;
      }
    }
docs: Print the configured log.