superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [incubator-superset] branch master updated: Refactor ConsoleLog (#7428)
Date Wed, 08 May 2019 20:05:15 GMT
This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
     new ef13500  Refactor ConsoleLog (#7428)
ef13500 is described below

commit ef13500d1ae7052b22c920fb1ab0c4bcb826a101
Author: Beto Dealmeida <>
AuthorDate: Wed May 8 13:05:01 2019 -0700

    Refactor ConsoleLog (#7428)
--- | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/ b/
index 4fc9057..e620e6a 100644
--- a/
+++ b/
@@ -326,6 +326,31 @@ cd superset
 FLASK_ENV=development flask run -p 8088 --with-threads --reload --debugger
+#### Logging to the browser console
+This feature is only available on Python 3. When debugging your application, you can have
the server logs sent directly to the browser console using the [ConsoleLog](
package. You need to mutate the app, by adding the following to your `` or ``:
+from console_log import ConsoleLog
+    app.wsgi_app = ConsoleLog(app.wsgi_app, app.logger)
+Then make sure you run your WSGI server using the right worker type:
+FLASK_ENV=development gunicorn superset:app -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker"
-b --reload
+You can log anything to the browser console, including objects:
+from superset import app
+app.logger.error('An exception occurred!')
 ### Frontend Assets
 Frontend assets (JavaScript, CSS, and images) must be compiled in order to properly display
the web UI. The `superset/assets` directory contains all NPM-managed front end assets. Note
that there are additional frontend assets bundled with Flask-Appbuilder (e.g. jQuery and bootstrap);
these are not managed by NPM, and may be phased out in the future.

View raw message