mediacenterjs
mediacenterjs copied to clipboard
Error feedback on the GUI
Most of the errors (if not all, I'm just scratching the surface of MediaCenterJS) are logged only on the console and not on the GUI.
One solution (rough but effective) could be to stream logger.error
to socket.io to the client and visualize it with a notification in the style of http://ksylvest.github.io/jquery-growl/.
Since the use of winston
library it should not be difficult to write a transport or an event listener on 'error' that sends the message to the client via socket.io
There is also an angular library with similar notifications https://github.com/marcorinck/angular-growl
Currently the log are written to a file as well in the log folder. I'm using Winston to keep track and write logs to the filesystem. Is that what you meant?
Thanks!
I mean most of the times, if not always, a standard user (not a developer) would probably just see the web app through a browser. IMHO it could be useful and more usable to have a feedback on the webpage when something is not working on the back end.
ow right! Yes, that makes sense! though in the current status of this app I wouldn't be too worried about having users without some technical knowledge but especially if we we are porting this to a node webkit environment we should definitely push messages from the server to the frontend. The websockets already in place would be ideal for that. Backend database loading is already forwarded to the frontend via websockets