sejal-gupta-ksolves opened a new pull request, #16725:
URL: https://github.com/apache/iceberg/pull/16725
### Closes: #14227
### Problem
The `iceberg-rest-fixture` image runs without an explicit logging
configuration, causing `slf4j-simple` to default to `INFO`. This floods the
container console with operational logs during routine REST API calls, making
it difficult to spot actual warnings or errors.
### Solution
1. Added a `simplelogger.properties` configuration file under
`docker/iceberg-rest-fixture/`.
2. Set the default threshold to `INFO` to preserve existing baseline
behavior out of the box.
3. Updated the `Dockerfile` to copy this file onto the execution classpath.
4. Wrapped the `Dockerfile` `CMD` layer in a shell script invocation (`sh
-c`) to dynamically evaluate custom runtime environment variables.
### Logging Switch Mechanism
Users can natively switch or completely turn off `INFO` logs at runtime via
the `LOG_LEVEL` environment variable:
* **Default Behavior (As-Is):**
```bash
docker run -d -p 8181:8181 local/iceberg-rest-fixture:test
### Verification Testing
```bash
# 1. Build the distribution JAR
./gradlew :iceberg-open-api:build -x test
# 2. Build the Docker image from root context
docker build -t local/iceberg-rest-fixture:test -f
docker/iceberg-rest-fixture/Dockerfile .
# 3. Verify Default Mode (Should output INFO logs)
docker run -d --name test-info -p 8181:8181 local/iceberg-rest-fixture:test
curl http://localhost:8181/v1/config
docker logs test-info
docker rm -f test-info
# 4. Verify Toggle Mode (Should stay clean of INFO logs)
docker run -d --name test-warn -e LOG_LEVEL=WARN -p 8181:8181
local/iceberg-rest-fixture:test
curl http://localhost:8181/v1/config
docker logs test-warn
docker rm -f test-warn
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]