gnodet-bot commented on code in PR #29847:
URL: https://github.com/apache/camel/pull/29847#discussion_r4563368995
##########
docs/user-manual/modules/ROOT/pages/camel-jbang-debugging.adoc:
##########
@@ -83,8 +83,8 @@ camel debug hello.yaml --background
This is useful in CI or non-interactive sessions where no TTY is available.
Unlike the interactive mode, `camel debug --background` does not require a
terminal:
-it launches the Camel integration with the route debugger enabled, writes its
output to
-`~/.camel/<pid>-run.log`, and waits up to `--background-wait` (60 seconds by
default) for
+it launches the Camel integration with the route debugger enabled, writes its
logging to
+`~/.camel/<pid>.log` (and the warnings, errors and other output to
`~/.camel/<pid>-run.log`), and waits up to `--background-wait` (60 seconds by
default) for
Review Comment:
🔵 **Nit:** This sentence is ~160 characters on a single line, which is
unwieldy in AsciiDoc source. Split the parenthetical onto its own line for
readability:
```suggestion
it launches the Camel integration with the route debugger enabled, writes
its logging to
`~/.camel/<pid>.log` (and the warnings, errors and other output to
`~/.camel/<pid>-run.log`),
and waits up to `--background-wait` (60 seconds by default) for
```
##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/BackgroundLog.java:
##########
@@ -83,9 +93,22 @@ static Path redirect(ProcessBuilder pb) throws IOException {
Path log = Files.createTempFile(dir, "run-", ".log");
pb.redirectErrorStream(true);
pb.redirectOutput(log.toFile());
+ // the logging is in the log file of the integration already, so not
all of it again in the output
+ pb.environment().put(CONSOLE_LOG_LEVEL, "WARN");
return log;
}
+ /**
+ * The log to show for an integration that has started: its log file,
which has all of its logging, or its output
+ * when it has no log file (its logging is off, JSON, or a logging
configuration of its own).
+ *
+ * @param output the output of the integration
+ */
Review Comment:
🔵 **Nit:** `logOf()` has two parameters (`pid` and `output`) but only
`@param output` is documented. Add `@param pid`:
```suggestion
*
* @param pid the pid of the integration
* @param output the output of the integration
*/
```
--
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]