code: public void start() {
          try {
              final Terminal terminal = TerminalConsoleAppender.getTerminal();
              if (terminal != null) {
                  readCommands(terminal);
              } else {
                  readCommands(System.in);
              }
          } catch (IOException e) {
              LogManager.getLogger("TerminalConsole").error("Failed to read console input", e);
          }
      }
docs: Start reading commands from the console.
  
  <p>Note that this method won't return until one of the following
  conditions are met:</p>
  
  <ul>
  <li>{@link #isRunning()} returns {@code false}, indicating that the
  application is shutting down.</li>
  <li>{@link #shutdown()} is triggered by the user (e.g. due to
  pressing CTRL+C)</li>
  <li>The input stream is closed.</li>
  </ul>