Setting SHELLHUB_LOG_LEVEL is not working #5380
-
|
We are having a problem with our VM running ShellHub as the logs are taking too much space. So we would like to set the log level to ERROR (or error, as it seems to be right so), but it does not work. We overwrote the level using the advised: we ran make start after deleting the containers. The environment variables do include SHELLHUB_LOG_LEVEL=true, but it still logs all [info] logs. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
|
@DougBR Which version of ShellHub are you using? |
Beta Was this translation helpful? Give feedback.
-
|
We updated it, but when using SHELLHUB_ENV=production, it seems it is pulling directly from DockerHub and doesn't consider the code release I am using (v0.20.1) and rather pulls the latest version there (from 2020). Is it possible that this is happening or is it pulling from somewhere else? I still got the info logs when using the v0.20.1 with the production tag value. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, @DougBR.
When
If you switched only Note: the |
Beta Was this translation helpful? Give feedback.
-
|
Here is my .env.override: SHELLHUB_SSH_PORT=[ourport]
SHELLHUB_ENV=production
SHELLHUB_DOMAIN=[ourdomain]
SHELLHUB_VERSION=v0.20.1
SHELLHUB_AUTO_SSL=true
SHELLHUB_REDIRECT_TO_HTTPS=true
SHELLHUB_LOG_LEVEL=errorHere are some logs from the API container: {"bytes_in":"0","bytes_out":"178","host":"api:8080","id":"","latency":"510115","latency_human":"510.115656ms","level":"info","method":"GET","msg":"","remote_ip":"172.18.0.8","status":200,"time":"2025-10-21T13:32:19Z","uri":"/api/info","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15"}
{"bytes_in":"0","bytes_out":"178","host":"api:8080","id":"","latency":"28600","latency_human":"28.60044ms","level":"info","method":"GET","msg":"","remote_ip":"172.18.0.8","status":200,"time":"2025-10-21T13:32:19Z","uri":"/api/info","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15"}
{"bytes_in":"0","bytes_out":"0","host":"api:8080","id":"","latency":"5","latency_human":"5.89µs","level":"info","method":"GET","msg":"","remote_ip":"172.18.0.7","status":200,"time":"2025-10-21T13:32:24Z","uri":"/api/healthcheck","user_agent":"curl/8.14.1"}
{"bytes_in":"0","bytes_out":"0","host":"api:8080","id":"","latency":"6","latency_human":"6.98µs","level":"info","method":"GET","msg":"","remote_ip":"172.18.0.7","status":200,"time":"2025-10-21T13:32:54Z","uri":"/api/healthcheck","user_agent":"curl/8.14.1"}I expected not to get logs with the level "info" for this version and the log level set to error. |
Beta Was this translation helpful? Give feedback.
@DougBR This version is no longer supported. Could you please upgrade to the latest version? The issue has already been fixed.
If you’re unable to upgrade ShellHub right now, you can configure your Docker engine to limit the size of log files as a workaround.