Method prints the stack trace of the calling thread in a human readable way.

@param logger   the logger used for printing.
@param logLevel the log level used for logging the stack trace.
966054
public static void printStackTrace(final Logger logger, final LogLevel logLevel) {
        printStackTrace((String) null, logger, logLevel);
    }
1200787
void printChunk(int logLevel, String tag, String msg) {
    android.util.Log.println(logLevel, tag, msg);
  }
1135067
@Trivial
    public void log(TraceComponent logger) {

        Tr.debug(logger, MessageFormat.format("Annotation [ {0} ]", getAnnotationClassName()));

        // Only log the non-defaulted values.
        for (String valueName : this.values.keySet()) {
            AnnotationValueImpl nextValue = getValue(valueName);

            String valueEnumClassName = nextValue.getEnumClassName();
            Object valueValue = nextValue.getObjectValue();
            // works for all value types, e.g., Object, Enumerated (as String), Class, Array

            if (valueEnumClassName != null) {
                Tr.debug(logger,
                         MessageFormat.format("  Value: Name [ {0} ] Enum Type [ {1} ] Value [ {2} ]",
                                              new Object[] { valueName, valueEnumClassName, valueValue }));
            } else {
                Tr.debug(logger, MessageFormat.format("  Value: Name [ {0} ] Value [ {1} ]",
                                                      new Object[] { valueName, valueValue }));
            }
        }
    }
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);
        }
    }
856948
public static void setLogLevel(String cls, String level){
        Logger l = null;
        if(Objects.isNullOrEmpty(cls))
            l = LogManager.getRootLogger();
        else
            l = LogManager.getLogger(cls);
        if(level.equalsIgnoreCase("TRACE"))
            l.setLevel(Level.TRACE);
        else if(level.equalsIgnoreCase("DEBUG"))
            l.setLevel(Level.DEBUG);
        else if(level.equalsIgnoreCase("INFO"))
            l.setLevel(Level.INFO);
        else if(level.equalsIgnoreCase("WARN"))
            l.setLevel(Level.WARN);
        else if(level.equalsIgnoreCase("ERROR"))
            l.setLevel(Level.ERROR);
    }
234628
public static void printStackTrace(StackTraceElement[] trace, java.io.PrintStream out) {
        Strand.printStackTrace(trace, out);
    }
1077728
@Override
	public void log(Level level, String msg, Throwable thrown) {
		
		super.log(level, maskPassword(msg), thrown);
	}
812462
@Override
  public void logException(LogLevel logLevel, Throwable throwable, Class clazz, String methodName) {
  }
457262
public void log(LogLevel level, String msg)
	{
		if (level != LogLevel.OFF && level.level <= logLevel.level)
			logger.add(writers, name, level, msg, null);
	}
134308
void printStackTrace(String lineSep, java.io.PrintWriter pw) {
        printText(pw, "msg", "Message:");
        pw.println("   " + getMessage());
        printText(pw, "stackTrace", "Stack trace:");
        if (stackTrace == null) {
            if (currentException != null)
                serializeCurrentException();
            if (stackTrace == null && previousExceptionObject != null)
                setStackTrace(previousExceptionObject);
        }

        if (stackTrace != null) {
            if (lineSep.equals(lineSeparator)) {
                pw.println(stackTrace);
            } else {
                char traceLineSep = lineSep.charAt(0);
                char currentLineSep = lineSeparator.charAt(0);
                StringBuffer sb = new StringBuffer(stackTrace);
                for (int i = 0; i < sb.length(); i++) {
                    if (sb.charAt(i) == traceLineSep) {
                        sb.setCharAt(i, currentLineSep);
                    }
                }
                pw.println(stackTrace);
            }
        }

        if (previousExceptionInfo != null) {
            printText(pw, "previousException", "Previous exception:");
            previousExceptionInfo.printStackTrace(lineSep, pw);
        }
    }
684527
private void setThreadLogger(PluginLogger logger, int loggingLevel) {
        pluginLogger.set(logger);
        logLevel.set(loggingLevel);
        JSch.setLogger(this);
    }
1037085
public void trace(String msg) {
        if (logger.isLoggable(Level.FINEST)) {
            log(SELF, Level.FINEST, msg, null);
        }
    }
694764
public void log(Level level, String loggerFqcn, Object message, Throwable t) {
        doLog(level, loggerFqcn, message, null, t);
    }
985749
private static void printStackTraceElement(StackTraceElement trace,
                                             PrintWriter out,
                                             ClassLoader loader)
  {
    try {
      LineMap map = getScriptLineMap(trace.getClassName(), loader);

      if (map != null) {
        LineMap.Line line = map.getLine(trace.getLineNumber());
        if (line != null) {
          out.print(trace.getClassName() + "." + trace.getMethodName());
          out.print("(" + line.getSourceFilename() + ":");
          out.println(line.getSourceLine(trace.getLineNumber()) + ")");
          return;
        }
      }
    } catch (Throwable e) {
    }
    
    out.println(trace);
  }
641514
@Override
    public void log(Level level, String msg) {
        if (isLoggable(level)) {
            LogRecord logRecord = createLogRecord(level, msg, null, null, null, null, null);
            log(logRecord);
        }
    }
837523
public static void logReducedStackTrace(Logger logger, Exception exception) {
		Exception here = new Exception();
		String[] hereStrings = getStackFrames(here);
		String[] throwableStrings = getStackFrames(exception);
		
		int linesToSkip = 1;
		while (throwableStrings.length - linesToSkip > 0 && hereStrings.length - linesToSkip > 0) {
			if (!StringUtils.equals(hereStrings[hereStrings.length-linesToSkip], throwableStrings[throwableStrings.length-linesToSkip])) {
				break;
			}
			linesToSkip++;
		}
		for (int i = 0; i<=throwableStrings.length-linesToSkip; i++) {
			logger.log(Level.SEVERE, throwableStrings[i]);
		}
	}
733973
public void log(Level level, String msg) {
		logIfEnabled(level, null, msg, UNKNOWN_ARG, UNKNOWN_ARG, UNKNOWN_ARG, null);
	}