Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Server Error Logs #1

Closed
localjo opened this issue Jun 23, 2014 · 2 comments · Fixed by #8
Closed

Add Server Error Logs #1

localjo opened this issue Jun 23, 2014 · 2 comments · Fixed by #8
Assignees
Milestone

Comments

@localjo
Copy link
Member

localjo commented Jun 23, 2014

Surface server-level errors into DevTools so that users can debug more quickly.

Also mentioned in solidusjs/solidus#61

@localjo localjo added this to the v1.0.0 milestone Jun 23, 2014
@localjo localjo self-assigned this Jun 23, 2014
@pushred
Copy link
Member

pushred commented Jun 25, 2014

The current state of logging affairs looks like:

[SOLIDUS] /events preprocessed in 0ms
[SOLIDUS] Requested resource: [200] http://proxy.storyteller.io/facebook/ufcfightclub/events?fields=name%2Clocation%2Cdescription%2Cvenue%2Cattending.fields(name%2Cpicture)
[SOLIDUS] Requested resource: [200] https://services.sparkart.net/api/v1/events?scope=upcoming&key=d828a4cb-f8a7-4bf5-a5bb-5a9eed9c27cb
[SOLIDUS] Requested resource: [200] http://staging.proxy.storyteller.io/ufc-com/event/ufcFightClubFeed
[SOLIDUS] /resources/events resources fetched in 458ms
[SOLIDUS] Running preprocessor for resources/events/index.hbs
[SOLIDUS] /resources/events preprocessed in 200ms

... and when things are on 🔥

[SOLIDUS] Running preprocessor for resources/events/index.hbs
[SOLIDUS] Preprocessor Error:
TypeError: Cannot read property 'feed' of undefined
    at eval (eval at <anonymous> (/vagrant/ufcfightclub.com/node_modules/solidus/lib/preprocessor_worker.js:12:40), <anonymous>:6:47)
    at module.exports (/vagrant/ufcfightclub.com/node_modules/solidus/lib/preprocessor_worker.js:12:46)
    at handle (/vagrant/ufcfightclub.com/node_modules/solidus/node_modules/worker-farm/lib/child/index.js:37:8)
    at process.<anonymous> (/vagrant/ufcfightclub.com/node_modules/solidus/node_modules/worker-farm/lib/child/index.js:43:3)
    at process.EventEmitter.emit (events.js:98:17)
    at handleMessage (child_process.js:318:10)
    at Pipe.channel.onread (child_process.js:345:11)

Improving these messages in general is a bigger, separate project, but we may need to explore moving to a logger library at the very least here to help get structured data and open a socket to stream the logs to you. The current implementation is pretty barebones, solely built for outputting to the terminal from a dev server. Something like bunyan, winston, or caterpillar. cc @joanniclaborde

@joanniclaborde
Copy link

Here's a Solidus pull request for this, using socket.io: solidusjs/solidus#113

If this library doesn't work for you, we can always try with another one.

@localjo localjo mentioned this issue Jul 1, 2014
@localjo localjo closed this as completed in #8 Jul 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants