code: public static void printAllStackTraces(final String filter, final Logger logger, final LogLevel logLevel) {
          for (Map.Entry<Thread, StackTraceElement[]> entry : Thread.getAllStackTraces().entrySet()) {
              if (filter == null || entry.getKey().getName().contains(filter)) {
                  StackTracePrinter.printStackTrace("Thread[" + entry.getKey().getName() + "] state[" + entry.getKey().getState().name() + "]", entry.getValue(), logger, logLevel);
              }
          }
      }
docs: Method prints the stack traces of all running java threads via the given logger.
  
  @param filter   only thread where the name of the thread contains this given {@code filter} key are printed. If the filter is null, no filtering will be performed.
  @param logger   the logger used for printing.
  @param logLevel the level to print.