REDASH_LOG_LEVEL setting does not work

Pre requirements:

I launched EC2 with the pre-baked AMI community created.

My trouble:

Redash works well everything, dashboard, data source setting and executing query.
Just I cannot change the setting of REDASH_LOG_LEVEL.

By the default, REDASH_LOG_LEVEL is set as INFO in “/opt/redash/env”.
I set WARNING in “/opt/redash/env”, and docker-compose down && docker-compose up -d was done.

I checked that the containers have enviroment variable of REDASH_LOG_LEVEL=WARNING.
But the containers still output INFO logging.

This situation is beginner’s. Where is my misunderstand how to set enviroment variables of the containers?
I wait for your any advise.

(some information is below)

##redash_server container
# docker inspect c45908a08401| jq '.[].Config.Env'
# docker logs c45908a08401
[2020-01-22 09:20:07 +0000] [1] [INFO] Starting gunicorn 19.7.1
[2020-01-22 09:20:07 +0000] [1] [INFO] Listening at: (1)
[2020-01-22 09:20:07 +0000] [1] [INFO] Using worker: sync
[2020-01-22 09:20:07 +0000] [9] [INFO] Booting worker with pid: 9
[2020-01-22 09:20:07 +0000] [11] [INFO] Booting worker with pid: 11
[2020-01-22 09:20:07 +0000] [13] [INFO] Booting worker with pid: 13
[2020-01-22 09:20:07 +0000] [14] [INFO] Booting worker with pid: 14
[2020-01-22 09:56:52,972][PID:9][ERROR][pyathena.common] Failed to execute query.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pyathena/", line 202, in _execute
    **request).get('QueryExecutionId', None)
  File "/usr/local/lib/python2.7/site-packages/pyathena/", line 57, in retry_api_call
    return retry(func, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/tenacity/", line 358, in call
    do = self.iter(retry_state=retry_state)
  File "/usr/local/lib/python2.7/site-packages/tenacity/", line 319, in iter
    return fut.result()
  File "/usr/local/lib/python2.7/site-packages/concurrent/futures/", line 455, in result
    return self.__get_result()
  File "/usr/local/lib/python2.7/site-packages/tenacity/", line 361, in call
    result = fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/botocore/", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python2.7/site-packages/botocore/", line 661, in _make_api_call
    raise error_class(parsed_response, operation_name)
InvalidRequestException: An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: outputLocation is not a valid S3 path. Provided xxxxx

I’m fairly sure Redash uses Python logging, so “WARNING” is not a valid log level, you need to use “WARN”.

However, this will still output INFO messages as this is the standard logging behavior, i.e. all log messages at the specified level OR ABOVE will be captured.

See this tutorial for more details

1 Like