foundersandcoders / open-tourism-platform

An open platform to facilitate the creation of apps to promote local tourism and business in Nazareth
MIT License
17 stars 3 forks source link

Event logging #17

Open sofer opened 7 years ago

sofer commented 7 years ago

We need to make sure that we are logging all user interactions, so that at some point we can interrogate them for a better understanding of how users are interacting with the apps on the platform.

mattlub commented 7 years ago

Do you mean logging info about requests to the API and their responses? Or something different/more specific?

sofer commented 7 years ago

For now, it really needn't be anything more sophisticated than an http log, with a time stamp, user details (if logged in) and request details.

mattlub commented 7 years ago

https://github.com/expressjs/morgan is a popular http logging with express/node package

mattlub commented 7 years ago

@des-des @m4v15 should we log to a file/a db collection/other?

e.g. morgan example logging to a new text file each day: https://github.com/expressjs/morgan#log-file-rotation

des-des commented 7 years ago

@mattlub we cannot log directly to fs in heroku, heroku fs is ephemeral.

mattlub commented 7 years ago

ok, I don't know where we should go with this then.

des-des commented 7 years ago

@sofer Are there more detailed requirements?

I expect some express logging middleware being hooked up to a mongo table will be fine for MVP @mattlub .