Provide a way to have execution log files created with different / templated file names
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
Instead of one static file name provided for the "execution log" file creation feature, this CR proposes the possibility to have differently named files created.
E.g. instead of having a static file like `--execution_log_json_file=execution-log.json` you could configure a file name like `execution-log-$N-$TS.json` resulting in files named in the provided scheme, e.g. `execution-log-test-unit-2025.09.02-13.17.123.json` (syntax is just an example, not a recommendation)
### Which category does this issue belong to?
CLI
### What underlying problem are you trying to solve with this feature?
In a not (yet) fully monolithic, consistently 'bazelized' environment you might have multiple Bazel targets to be executed in a row, all creating (and currently overwriting) execution log files (if activated in one common place like `.bazelrc`). Currently - if you want to have the execution log available for every build - you can only either invoke Bazel with different command line options, or you make sure you copy away created execution logs directly after each invocation (i.e. write a wrapper for Bazel calls).
Having a way to provide a template for those files (or some other measure resulting in differently called files) would solve this issue in a clean way without having to deal with wrappers or individual invocations.
### Which operating system are you running Bazel on?
Different Linux distributions, Windows 11
### What is the output of `bazel info release`?
release 8.3.0
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
```text
```
### Have you found anything relevant by searching the web?
Nothing - currently using a background process collecting and processing files as they emerge
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start by tracing the --execution_log_json_file option and its use from .bazelrc through sequential Bazel invocations. Clarify the template syntax and supported values, then verify that separate targets create distinct execution log files instead of overwriting one another on Linux and Windows.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100