From 14ce251e3beb13c1b14b0b57d10d7fea187758aa Mon Sep 17 00:00:00 2001 From: majinghe <42570491+majinghe@users.noreply.github.com> Date: Tue, 20 Jan 2026 12:09:41 +0800 Subject: [PATCH] enhancement: unify logger level setting using obs env instead of RUST_LOG (#1529) Signed-off-by: heihutu <30542132+heihutu@users.noreply.github.com> Signed-off-by: majinghe <42570491+majinghe@users.noreply.github.com> Co-authored-by: heihutu <30542132+heihutu@users.noreply.github.com> --- Dockerfile | 4 +++- docs/ansible/binary-mnmd.yml | 1 - docs/examples/docker/docker-comprehensive.yml | 1 - docs/examples/docker/docker-quickstart.sh | 2 +- docs/examples/docker/enhanced-docker-deployment.sh | 2 +- helm/rustfs/values.yaml | 5 ++--- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f22a10c6..9962505c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -81,7 +81,9 @@ ENV RUSTFS_ADDRESS=":9000" \ RUSTFS_CORS_ALLOWED_ORIGINS="*" \ RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" \ RUSTFS_VOLUMES="/data" \ - RUST_LOG="warn" + RUSTFS_OBS_LOGGER_LEVEL=warn \ + RUSTFS_OBS_LOG_DIRECTORY=/logs \ + RUSTFS_OBS_ENVIRONMENT=production EXPOSE 9000 9001 diff --git a/docs/ansible/binary-mnmd.yml b/docs/ansible/binary-mnmd.yml index c208c1680..afb4918fb 100644 --- a/docs/ansible/binary-mnmd.yml +++ b/docs/ansible/binary-mnmd.yml @@ -87,7 +87,6 @@ RUSTFS_VOLUMES="http://rustfs-node{1...4}:9000/data/rustfs{0...3}" RUSTFS_ADDRESS=":9000" RUSTFS_CONSOLE_ENABLE=true - RUST_LOG=error RUSTFS_OBS_LOG_DIRECTORY="/var/logs/rustfs/" RUSTFS_EXTERNAL_ADDRESS=0.0.0.0:9000 owner: root diff --git a/docs/examples/docker/docker-comprehensive.yml b/docs/examples/docker/docker-comprehensive.yml index 7a3ddd43b..7a1555958 100644 --- a/docs/examples/docker/docker-comprehensive.yml +++ b/docs/examples/docker/docker-comprehensive.yml @@ -47,7 +47,6 @@ services: - RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=* - RUSTFS_ACCESS_KEY=dev-admin - RUSTFS_SECRET_KEY=dev-password - - RUST_LOG=debug - RUSTFS_OBS_LOGGER_LEVEL=debug volumes: - rustfs-dev-data:/data diff --git a/docs/examples/docker/docker-quickstart.sh b/docs/examples/docker/docker-quickstart.sh index a83da686e..725523db8 100755 --- a/docs/examples/docker/docker-quickstart.sh +++ b/docs/examples/docker/docker-quickstart.sh @@ -84,7 +84,7 @@ quick_dev() { -e RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" \ -e RUSTFS_ACCESS_KEY="dev-admin" \ -e RUSTFS_SECRET_KEY="dev-secret" \ - -e RUST_LOG="debug" \ + -e RUSTFS_OBS_LOGGER_LEVEL="debug" \ -v rustfs-dev-data:/data \ rustfs/rustfs:latest diff --git a/docs/examples/docker/enhanced-docker-deployment.sh b/docs/examples/docker/enhanced-docker-deployment.sh index aa6f5ee85..8d99c5d19 100755 --- a/docs/examples/docker/enhanced-docker-deployment.sh +++ b/docs/examples/docker/enhanced-docker-deployment.sh @@ -105,7 +105,7 @@ deploy_development() { -e RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" \ -e RUSTFS_ACCESS_KEY="dev-access" \ -e RUSTFS_SECRET_KEY="dev-secret" \ - -e RUST_LOG="debug" \ + -e RUSTFS_OBS_LOGGER_LEVEL="debug" \ -v rustfs-dev-data:/data \ rustfs/rustfs:latest diff --git a/helm/rustfs/values.yaml b/helm/rustfs/values.yaml index addb641c9..3a4794af8 100644 --- a/helm/rustfs/values.yaml +++ b/helm/rustfs/values.yaml @@ -53,11 +53,10 @@ config: address: ":9000" console_enable: "true" console_address: ":9001" - log_level: "debug" - rust_log: "debug" + log_level: "info" region: "us-east-1" obs_log_directory: "/logs" - obs_environment: "develop" + obs_environment: "development" # Optionally enable support for virtual-hosted-style requests. # See more information: https://docs.rustfs.com/integration/virtual.html domains: "" # e.g. "example.com"