Page MenuHomePhabricator

Error message should be readable in developing mode
Closed, InvalidPublic

Description

I try to tweak the mathoid code and find the error message unreadable, the stack trace is displayed as a string with '\n' as linebreaks.

This is the setup:

git clone ssh://golopotw@gerrit.wikimedia.org:29418/mediawiki/services/mathoid
npm install
node server.js

The error look like this

"message":"500: internal_error","stack":"ReferenceError: app is not defined\n    at /home/jchn/mathoidq/routes/info.js:15:15\n    at Layer.handle [as handle_request] (/home/jchn/mathoidq/node_modules/express/lib/router/layer.js:95:5)\n    at next (/home/jchn/mathoidq/node_modules/express/lib/router/route.js:137:13)\n    at Route.dispatch (/home/jchn/mathoidq/node_modules/express/lib/router/route.js:112:3)\n    at Layer.handle [as handle_request] (/home/jchn/mathoidq/no

Event Timeline

Golopotw updated the task description. (Show Details)

The logger is provided by service-runner, so Mathoid cannot control how the log is be displayed on terminal.

mobrovac subscribed.

node server.js | ./node_modules/.bin/bunyan will give you a formatted output.