jansmolders86 / mediacenterjs

A HTML/CSS/Javascript (NodeJS) based Media center
http://mediacenterjs.com
1.29k stars 243 forks source link

Error feedback on the GUI #196

Open matita opened 9 years ago

matita commented 9 years ago

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

matita commented 9 years ago

There is also an angular library with similar notifications https://github.com/marcorinck/angular-growl

jansmolders86 commented 9 years ago

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!

matita commented 9 years ago

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.

jansmolders86 commented 9 years ago

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