Hi, I've noticed that in some cases there can be q...
# community-support
j
Hi, I've noticed that in some cases there can be quite a bit of lag in logging (up to 2 secs) and that can complicate trying to figure out in which order things actually happen out of logs. Is there a way to tune this? (e.g. disabling buffering, reducing flush delay etc)
Example:
Copy code
73844  2025-05-13T18:47:19.745+0000 [DEBUG] [DebianKotlinBuildPlugin] BeforeProject project=gradle-build-conventions rootProject=gradle-build-conventions
 74548  2025-05-13T18:47:19.930+0000 [DEBUG] [DebianKotlinBuildPlugin] BeforeProject project=buildsrc-compat rootProject=gradle-build-conventions
 76035  2025-05-13T18:47:20.532+0000 [DEBUG] [DebianKotlinBuildPlugin] BeforeProject project=compiler-tests-convention rootProject=gradle-build-conventions
 77062  2025-05-13T18:47:20.826+0000 [DEBUG] [DebianKotlinBuildPlugin] BeforeProject project=generators rootProject=gradle-build-conventions
 78087  2025-05-13T18:47:21.085+0000 [DEBUG] [DebianKotlinBuildPlugin] BeforeProject project=prepare-deps rootProject=gradle-build-conventions
 80719  2025-05-13T18:47:19.642+0000 [DEBUG] [DebianKotlinBuildPlugin] BeforeProject project=kotlin rootProject=kotlin
 81256  2025-05-13T18:47:19.736+0000 [DEBUG] [DebianKotlinBuildPlugin] ProjectsLoaded build=gradle-build-conventions
 81303  2025-05-13T18:47:21.362+0000 [DEBUG] [DebianKotlinBuildPlugin] ProjectsEvaluated build=gradle-build-conventions
notice
18:47:21.085
then back to
18:47:19.642
e
that happens with anything that tries to capture stdout and stderr independently, as most CI systems seem to
if you can run
./gradlew 2>&1
to merge them into a single stream before being captured, the output should be ordered
j
excepted that it's not a CI, it's actually
> log 2>&1
, same class, same message log level, probably different thread though
e
that messaging doesn't appear to be what gradle outputs itself. are you running through
annotate-output
or something like that?
j
plain old
logger.debug(...)
ah, on the left I added a line number, not all lines are there (grep)
e
ahh that makes more sense