You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "jcjveraa (via GitHub)" <gi...@apache.org> on 2026/02/12 12:53:01 UTC

[I] Environmental parameters seem to be ignored [superset]

jcjveraa opened a new issue, #37928:
URL: https://github.com/apache/superset/issues/37928

   ### Bug description
   
   When using [the release build of 6.0.0](https://hub.docker.com/r/apache/superset/tags?name=6.0.0), environmental parameters such as `SUPERSET_LOG_LEVEL` are completely ignored, as demonstrated by my post in this issue: https://github.com/apache/superset/issues/37842#issuecomment-3890688837. 
   
   I see other issues related to variables being ignored e.g. #37924 & #37864 - perhaps this is some larger bug where something went wrong in loading environmental args? 
   
   ### Screenshots/recordings
   
   Copy of what I posted in https://github.com/apache/superset/issues/37842#issuecomment-3890688837
   ```
   $ env | grep SUPERSET_LOG_LEVEL
   SUPERSET_LOG_LEVEL=DEBUG
   $ superset re-encrypt-secrets
   Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
   2026-02-12 12:30:19,865:INFO:alembic.runtime.migration:Context impl PostgresqlImpl.
   2026-02-12 12:30:19,866:INFO:alembic.runtime.migration:Will assume transactional DDL.
   2026-02-12 12:30:20,303:INFO:superset.app:Syncing configuration to database...
   2026-02-12 12:30:20,317:INFO:superset.app:Configuration sync to database completed successfully
   2026-02-12 12:30:21,330:INFO:superset.utils.encrypt:Collecting info for re encryption
   2026-02-12 12:30:21,331:INFO:superset.utils.encrypt:All tables processed
   $ superset --debug re-encrypt-secrets
   Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
   2026-02-12 12:30:38,176:DEBUG:superset.utils.logging_configurator:logging was configured successfully
   2026-02-12 12:30:38,234:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
   2026-02-12 12:30:38,251:DEBUG:superset.initialization:Setting database isolation level to READ COMMITTED
   2026-02-12 12:30:39,049:INFO:alembic.runtime.migration:Context impl PostgresqlImpl.
   2026-02-12 12:30:39,049:INFO:alembic.runtime.migration:Will assume transactional DDL.
   2026-02-12 12:30:39,476:INFO:superset.app:Syncing configuration to database...
   2026-02-12 12:30:39,484:DEBUG:superset.commands.theme.seed:Updated system theme: THEME_DEFAULT
   2026-02-12 12:30:39,490:DEBUG:superset.commands.theme.seed:Updated system theme: THEME_DARK
   2026-02-12 12:30:39,491:INFO:superset.app:Configuration sync to database completed successfully
   2026-02-12 12:30:40,534:INFO:superset.utils.encrypt:Collecting info for re encryption
   2026-02-12 12:30:40,535:INFO:superset.utils.encrypt:All tables processed
   $
   ```
   
   ### Superset version
   
   6.0.0
   
   ### Python version
   
   3.10
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Environmental parameters seem to be ignored [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #37928:
URL: https://github.com/apache/superset/issues/37928#issuecomment-3890847745

   <!-- Answer -->
   That's right—SUPERSET_LOG_LEVEL isn't automatically used by Superset in production or Docker; it's not read by the codebase unless you explicitly wire it up in your config. The log level is actually controlled by the LOG_LEVEL config variable, which you can set in your superset_config.py by reading from any environment variable you want (for example, LOG_LEVEL or SUPERSET_LOG_LEVEL). FLASK_DEBUG (or the DEBUG flag) only toggles debug mode, not the log level directly.
   
   If you want to control logging via environment variables, add something like this to your superset_config.py:
   
   ```python
   import os
   LOG_LEVEL = os.environ.get("LOG_LEVEL", "INFO")
   ```
   
   Then set LOG_LEVEL in your environment. This will work in both dev and production. If you want to keep using SUPERSET_LOG_LEVEL, just change the variable name in the code above. Superset doesn't automatically pick up either one—you have to connect them yourself in the config file. 
   
   Let me know if you want a more detailed example or have questions about other config overrides!
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/cfc09fe4-9cac-4e6c-a77a-6d4dc4bcacd1?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/cfc09fe4-9cac-4e6c-a77a-6d4dc4bcacd1?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/cfc09fe4-9cac-4e6c-a77a-6d4dc4bcacd1?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/cfc09fe4-9cac-4e6c-a77a-6d4dc4bcacd1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cfc09fe4-9cac-4e6c-a77a-6d4dc4bcacd1?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/cfc09fe4-9cac-4e6c-a77a-6d4dc4bcacd1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/cfc09fe4-9cac-4e6c-a77a-6d4dc4bcacd1?feedback_type=other)</sup>
   
   [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=That%27s%20right%E2%80%94SUPERSET_LOG_LEVEL%20isn%27t%20automatically%20used%20by%20Superset%20in%20production%20or%20Docker%3B%20it%27s%20not%20read%20by%20the%20codebase%20unless%20you%20explicitly%20wire%20it%20up%20in%20your%20config.%20The%20log%20level%20is%20actually%20controlled%20by%20the%20LOG_LEVEL%20config%20variable%2C%20which%20you%20can%20set%20in%20your%20superset_config.py%20by%20reading%20from%20any%20environment%20variable%20you%20want%20%28for%20example%2C%20LOG_LEVEL%20or%20SUPERSET_LOG_LEVEL%29.%20FLASK_DEBUG%20%28or%20the%20DEBUG%20flag%29%20only%20toggles%20debug%20mode%2C%20not%20the%20log%20level%20directly.%0A%0AIf%20you%20want%20to%20control%20logging%20via%20environment%20variables%2C%20add%20something%20like%20this%20t
 o%20your%20superset_config.py%3A%0A%0A%60%60%60python%0Aimport%20os%0ALOG_LEVEL%20%3D%20os.environ.get%28%22LOG_LEVEL%22%2C%20%22INFO%22%29%0A%60%60%60%0A%0AThen%20set%20LOG_LEVEL%20in%20your%20environment.%20This%20will%20work%20in%20both%20dev%20and%20production.%20If%20you%20want%20to%20keep%20using%20SUPERSET_LOG_LEVEL%2C%20just%20change%20the%20variable%20name%20in%20the%20code%20above.%20Superset%20doesn%27t%20automatically%20pick%20up%20either%20one%E2%80%94you%20have%20to%20connect%20them%20yourself%20in%20the%20config%20file.%20%0A%0ALet%20me%20know%20if%20you%20want%20a%20more%20detailed%20example%20or%20have%20questions%20about%20other%20config%20overrides%21)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache
 /superset/issues/37928)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Environmental parameters seem to be ignored [superset]

Posted by "jcjveraa (via GitHub)" <gi...@apache.org>.
jcjveraa closed issue #37928: Environmental parameters seem to be ignored
URL: https://github.com/apache/superset/issues/37928


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Environmental parameters seem to be ignored [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #37928:
URL: https://github.com/apache/superset/issues/37928#issuecomment-3890817916

   <!-- Answer -->
   This is a known issue in Superset 6.0.0: environment variables like `SUPERSET_LOG_LEVEL` are not automatically respected because the codebase never reads them for logging configuration. The log level is set based on the `DEBUG` flag (from `FLASK_DEBUG`), not `SUPERSET_LOG_LEVEL`—so setting `SUPERSET_LOG_LEVEL` in your environment has no effect unless you explicitly handle it in your config file. This applies to both Docker and non-Docker setups [source](https://github.com/apache/superset/issues/37842#issuecomment-3890688837).
   
   If you want to control the logging level via environment variables, you need to modify your `superset_config.py` (or `superset_config_docker.py`) to read from the environment and set the `LOG_LEVEL` config variable. For example:
   
   ```python
   import os
   
   def get_env_variable(name, default):
       return os.environ.get(name, default)
   
   LOG_LEVEL = get_env_variable("SUPERSET_LOG_LEVEL", "INFO")
   ```
   
   This will allow you to set `SUPERSET_LOG_LEVEL` in your environment and have it actually affect Superset's logging [source](https://github.com/apache/superset/discussions/37264#discussioncomment-15545328).
   
   For Docker Compose, be aware that variables set in the `environment` section of your YAML override those from `.env` or `.env-local` files. If your `.env-local` changes are being ignored, either remove the explicit variable from the Compose YAML or set it in your host shell before running Compose [source](https://github.com/apache/superset/issues/35843).
   
   If you need to suppress verbose logs from third-party libraries (like `watchdog`), you can set their log levels directly in your config file:
   
   ```python
   import logging
   logging.getLogger("watchdog").setLevel(logging.ERROR)
   ```
   [source](https://github.com/apache/superset/discussions/36152#discussioncomment-14996526)
   
   Let me know if you need more details on config overrides or troubleshooting secret key rotation.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/37a61bde-160a-4eaa-b790-145dfbf70ce5?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/37a61bde-160a-4eaa-b790-145dfbf70ce5?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/37a61bde-160a-4eaa-b790-145dfbf70ce5?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/37a61bde-160a-4eaa-b790-145dfbf70ce5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/37a61bde-160a-4eaa-b790-145dfbf70ce5?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/37a61bde-160a-4eaa-b790-145dfbf70ce5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/37a61bde-160a-4eaa-b790-145dfbf70ce5?feedback_type=other)</sup>
   
   [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20issue%20in%20Superset%206.0.0%3A%20environment%20variables%20like%20%60SUPERSET_LOG_LEVEL%60%20are%20not%20automatically%20respected%20because%20the%20codebase%20never%20reads%20them%20for%20logging%20configuration.%20The%20log%20level%20is%20set%20based%20on%20the%20%60DEBUG%60%20flag%20%28from%20%60FLASK_DEBUG%60%29%2C%20not%20%60SUPERSET_LOG_LEVEL%60%E2%80%94so%20setting%20%60SUPERSET_LOG_LEVEL%60%20in%20your%20environment%20has%20no%20effect%20unless%20you%20explicitly%20handle%20it%20in%20your%20config%20file.%20This%20applies%20to%20both%20Docker%20and%20non-Docker%20setups%20%5Bsource%5D%28https%3A//github.com/apache/superset/issues/37842%23issuecomment-3890688837%29.%0A%0AIf%20you%20want%20to%20control%20the%20loggin
 g%20level%20via%20environment%20variables%2C%20you%20need%20to%20modify%20your%20%60superset_config.py%60%20%28or%20%60superset_config_docker.py%60%29%20to%20read%20from%20the%20environment%20and%20set%20the%20%60LOG_LEVEL%60%20config%20variable.%20For%20example%3A%0A%0A%60%60%60python%0Aimport%20os%0A%0Adef%20get_env_variable%28name%2C%20default%29%3A%0A%20%20%20%20return%20os.environ.get%28name%2C%20default%29%0A%0ALOG_LEVEL%20%3D%20get_env_variable%28%22SUPERSET_LOG_LEVEL%22%2C%20%22INFO%22%29%0A%60%60%60%0A%0AThis%20will%20allow%20you%20to%20set%20%60SUPERSET_LOG_LEVEL%60%20in%20your%20environment%20and%20have%20it%20actually%20affect%20Superset%27s%20logging%20%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/37264%23discussioncomment-15545328%29.%0A%0AFor%20Docker%20Compose%2C%20be%20aware%20that%20variables%20set%20in%20the%20%60environment%60%20section%20of%20your%20YAML%20override%20those%20from%20%60.env%60%20or%20%60.env-local%60%20files.%20If%20your%20%60.e
 nv-local%60%20changes%20are%20being%20ignored%2C%20either%20remove%20the%20explicit%20variable%20from%20the%20Compose%20YAML%20or%20set%20it%20in%20your%20host%20shell%20before%20running%20Compose%20%5Bsource%5D%28https%3A//github.com/apache/superset/issues/35843%29.%0A%0AIf%20you%20need%20to%20suppress%20verbose%20logs%20from%20third-party%20libraries%20%28like%20%60watchdog%60%29%2C%20you%20can%20set%20their%20log%20levels%20directly%20in%20your%20config%20file%3A%0A%0A%60%60%60python%0Aimport%20logging%0Alogging.getLogger%28%22watchdog%22%29.setLevel%28logging.ERROR%29%0A%60%60%60%0A%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/36152%23discussioncomment-14996526%29%0A%0ALet%20me%20know%20if%20you%20need%20more%20details%20on%20config%20overrides%20or%20troubleshooting%20secret%20key%20rotation.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shi
 elds.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37928)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Environmental parameters seem to be ignored [superset]

Posted by "jcjveraa (via GitHub)" <gi...@apache.org>.
jcjveraa commented on issue #37928:
URL: https://github.com/apache/superset/issues/37928#issuecomment-3890843622

   @dosu ah, very indirectly I seen now that SUPERSET_LOG_LEVEL seems to be exclusively for the dev environment and we should actually override the Flash environment variable 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org