0

In SPRING SHELL 2 the default incorrect command and error output colors are red. Is it possible to define custom colors for these purposes?

Thank you!

Liubov E.
  • 129
  • 1
  • 1
  • 9

1 Answers1

1

What happens when execution of a command ends up throwing an exception is handled by ThrowableResultHandler, whose implementation use RED to display text.

If you want to customize this, just override that result handler.

ebottard
  • 1,997
  • 2
  • 12
  • 14
  • Thank you! As I understood, another functionality is used in the incorrect command case (before command execution). Am I right? – Liubov E. Sep 05 '18 at 18:48
  • Also, is it possible to disable the colorization at all or not? – Liubov E. Sep 05 '18 at 18:49
  • Could also provide a small sample of the overrided handler? How is it possible to introduce it to the main program? – Liubov E. Sep 06 '18 at 09:45
  • @ebottard, I have the same problem .... how to override `ThrowableResultHandler` ? extending of `ThrowableResultHandler` and making it as component results in `Multiple ResultHandlers configured for class java.lang.Throwable` – Roman Ivanov May 04 '20 at 19:18