KEMBAR78
INFO output even on higher log levels · Issue #541 · static-web-server/static-web-server · GitHub
Skip to content

INFO output even on higher log levels #541

@Tasssadar

Description

@Tasssadar

Search for duplicate issues

  • I already searched, and this issue is not a duplicate.

Issue scope

CLI

Describe the bug

Sws prints a bunch of "info"-level messages during startup, despite higher log level being set.

$ ./static-web-server  --log-level=warn -d .
2025-04-29T12:20:51.162859Z  INFO static_web_server::info: static-web-server 2.36.1
2025-04-29T12:20:51.163166Z  INFO static_web_server::info: log level: warn
2025-04-29T12:20:51.163668Z  INFO static_web_server::info: server bound to tcp socket [::]:80
2025-04-29T12:20:51.163683Z  INFO static_web_server::info: runtime worker threads: 12
2025-04-29T12:20:51.163686Z  INFO static_web_server::info: runtime max blocking threads: 512
2025-04-29T12:20:51.164102Z  INFO static_web_server::info: redirect trailing slash: enabled=true
2025-04-29T12:20:51.164115Z  INFO static_web_server::info: ignore hidden files: enabled=false
2025-04-29T12:20:51.164118Z  INFO static_web_server::info: disable symlinks: enabled=false
2025-04-29T12:20:51.164120Z  INFO static_web_server::info: grace period before graceful shutdown: 0s
2025-04-29T12:20:51.164155Z  INFO static_web_server::info: index files: index.html
2025-04-29T12:20:51.164179Z  INFO static_web_server::info: directory listing: enabled=false
2025-04-29T12:20:51.164182Z  INFO static_web_server::info: directory listing order code: 6
2025-04-29T12:20:51.164185Z  INFO static_web_server::info: directory listing format: Html
2025-04-29T12:20:51.164485Z  INFO static_web_server::info: fallback page: enabled=false, value=""
2025-04-29T12:20:51.164491Z  INFO static_web_server::info: health endpoint: enabled=false
2025-04-29T12:20:51.164494Z  INFO static_web_server::info: log requests with remote IP addresses: enabled=false
2025-04-29T12:20:51.164497Z  INFO static_web_server::info: log X-Real-IP header: enabled=false
2025-04-29T12:20:51.164499Z  INFO static_web_server::info: log X-Forwarded-For header: enabled=false
2025-04-29T12:20:51.164503Z  INFO static_web_server::info: trusted IPs for X-Forwarded-For: all
2025-04-29T12:20:51.164523Z  INFO static_web_server::info: basic authentication: enabled=false
2025-04-29T12:20:51.164526Z  INFO static_web_server::info: maintenance mode: enabled=false
2025-04-29T12:20:51.164529Z  INFO static_web_server::info: maintenance mode status: 503
2025-04-29T12:20:51.164531Z  INFO static_web_server::info: maintenance mode file: ""
2025-04-29T12:20:51.164534Z  INFO static_web_server::info: compression static: enabled=false
2025-04-29T12:20:51.164569Z  INFO static_web_server::info: auto compression: enabled=true, formats=deflate,gzip,brotli,zstd, compression level=Default
2025-04-29T12:20:51.164573Z  INFO static_web_server::info: cache control headers: enabled=true
2025-04-29T12:20:51.164576Z  INFO static_web_server::info: security headers: enabled=false
2025-04-29T12:20:51.165112Z  INFO static_web_server::info: http1 server is listening on http://[::]:80
2025-04-29T12:20:51.165128Z  INFO static_web_server::info: press ctrl+c to shut down the server

How to reproduce it

Run the server with --log-level=warn.

Expected behavior

Only WARN and higher messages are printed.

Complementary information

No response

Build target

aarch64-apple-darwin

Environment and specs

  • static-web-server: 2.36.1

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv2v2 release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions