mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 17:38:54 +00:00
Setup events logging from settings.
This commit is contained in:
parent
8615429e0c
commit
6d62f0d2c9
@ -7,6 +7,7 @@ from flask_peewee.db import Database
|
||||
|
||||
import redis
|
||||
from statsd import StatsClient
|
||||
import events
|
||||
from redash import settings, utils
|
||||
|
||||
__version__ = '0.3.6'
|
||||
@ -19,6 +20,9 @@ def setup_logging():
|
||||
logging.getLogger().addHandler(handler)
|
||||
logging.getLogger().setLevel(settings.LOG_LEVEL)
|
||||
|
||||
if settings.EVENTS_LOG_PATH:
|
||||
events.setup_logging(settings.EVENTS_LOG_PATH, settings.EVENTS_CONSOLE_OUTPUT)
|
||||
|
||||
setup_logging()
|
||||
|
||||
app = Flask(__name__,
|
||||
|
@ -65,4 +65,6 @@ STATIC_ASSETS_PATH = fix_assets_path(os.environ.get("REDASH_STATIC_ASSETS_PATH",
|
||||
WORKERS_COUNT = int(os.environ.get("REDASH_WORKERS_COUNT", "2"))
|
||||
COOKIE_SECRET = os.environ.get("REDASH_COOKIE_SECRET", "c292a0a3aa32397cdb050e233733900f")
|
||||
LOG_LEVEL = os.environ.get("REDASH_LOG_LEVEL", "INFO")
|
||||
EVENTS_LOG_PATH = os.environ.get("REDASH_EVENTS_LOG_PATH", "")
|
||||
EVENTS_CONSOLE_OUTPUT = parse_boolean(os.environ.get("REDASH_EVENTS_CONSOLE_OUTPUT", "false"))
|
||||
ANALYTICS = os.environ.get("REDASH_ANALYTICS", "")
|
Loading…
Reference in New Issue
Block a user