Skip to content

Logs in launches

By default, a test report contains no log output — your tests' console logs live in CI, not in the report files that get uploaded to Sulu. So if your tests log plenty but a launch's Logs panel is empty, that's expected until you turn on one of the two options below.

You wantUseGranularitySetup
The whole run's console in the launch — any languagesuluctl watchlaunch-levelnone — on by default
Per-test logs under each resultsuluctl initper test resultone-time scaffold (Java + log4j2)

Both rely on the suluctl CLI — install it first.

Whole-run console — watch

The simplest path, and it works for any language or framework. Run your tests throughsuluctl watch (rather than uploading the results afterwards) so suluctl can capture the console:

bash
suluctl watch --results ./allure-results -- mvn test
# also: ./gradlew test · pytest · npx playwright test · dotnet test · …

The run's stdout and stderr appear in the launch's Logs panel (stdout as INFO, stderr as ERROR). This is on by default.

  • Disable it with SULU_SHIP_CONSOLE=false (or the --ship-console=false flag).
  • Capture is best-effort — if Sulu is unreachable it never affects your test command's exit code.
  • Capped at ~50 MB / 200k lines per run.

⚠️ Don't print secrets. Console shipping sends all stdout/stderr to Sulu — don't print tokens, credentials, or PII in tests, or turn it off with SULU_SHIP_CONSOLE=false.

These logs are launch-scoped — the whole run's console, shown at the launch level rather than under an individual test result. For logs under each result, see below.

Per-test logs — suluctl init

To show logs under each individual test result (the result's own Logs tab), the test framework has to attach them while the test runs. For Java projects using log4j2, suluctl init wires this up for you:

bash
suluctl init                                  # detects log4j2 → scaffolds the log glue,
                                              # then prints the log4j2.xml snippet to add
suluctl watch --results ./build/allure-results -- ./gradlew test

init scaffolds a small log appender plus a per-test flush, and prints a <SuluLog> appender and a <Configuration packages="…"> block to paste into your log4j2.xml (suluctl never edits your logging config for you — it shows you the exact snippet).

  • pytest and Playwright already attach per-test logs through allure-pytest / allure-playwright — no extra setup needed.
  • logback / JUL are not auto-wired yet — use the whole-run watch path above, or add log4j2.
  • xUnit per-test log capture is planned for a later release.

Logs still not showing?

  1. Run through watch, not a bare upload — only watch can capture the console.
  2. For per-test logs: the <SuluLog> appender must be registered in log4j2.xml, and the <Configuration> element must carry packages="<your glue package>" — without it log4j2 can't find the appender.
  3. The log attachment must be named log with MIME type text/plain — the scaffolded glue does this automatically; a hand-written integration must match.

Sulu Test Management System