HSLdevcom / transitlog

Explore observed public transport and compare with the intended traffic
https://reittiloki.hsl.fi/
Creative Commons Attribution 4.0 International
5 stars 1 forks source link

EPIC: logging improvements #27

Open paasovaara opened 5 years ago

paasovaara commented 5 years ago

Currently both transitlog-server and ui (express server) do very little logging. This makes troubleshooting quite difficult, specially during the deployment phase (but also during production)

Conventions used in other stacks (at least Transitdata):

example log output (you can add more fields but perhaps consider using the same naming conventions?)

{
  "timestamp":"2019-05-14T11:43:23.764Z",
  "level":"INFO", # or: ERROR, WARN 
  "message":"your message here"}

For server side logging it would make sense to perhaps log all the requests with these information (if possible):

for example more fields?

{
  "http-result":200,
  "processing-time":120  # ms
}

Also please add detailed logging specially in the beginning of the app (f.ex possible connection errors to db, etc) and also some message if server is shut down, etc?