gnodet-bot commented on code in PR #29826:
URL: https://github.com/apache/camel/pull/29826#discussion_r4562186099
##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelCommand.java:
##########
@@ -322,6 +323,15 @@ protected void printlnColored(Object text) {
}
}
+ /**
+ * Whether the colors of {@link #printColored(Object)} are left out: the
command prints to the console, and the
+ * output is not a terminal (a file or a pipe). A command that prints much
text in colors, such as camel log, prints
+ * it without colors then, as the console takes the colors out of each
piece of text, which is slow (CAMEL-26911).
Review Comment:
💡 **Nit:** The opening phrase “colors are left out” reads as the caller
omitting colors, whereas the method actually checks whether the console is in
`Strip` mode. Aligning the wording with the method name and the
`AnsiMode.Strip` check:
```suggestion
* Whether the console strips the ANSI colors: the command prints to the
console, and the output is not a terminal
* (a file or a pipe). A command that prints much text in colors, such
as camel log, can skip the ANSI codes then,
* as letting the console strip each piece of text is slow (CAMEL-26911).
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]