mozilla / webcompat-dashboard

Web Compatibility Knowledge Base Next Generation Dashboard
Mozilla Public License 2.0
2 stars 2 forks source link

Don't send an empty message in the access log json. #18

Closed denschub closed 7 months ago

denschub commented 7 months ago

I initially didn't do it because undefined is imcompatible with the type signature, but if we have an empty string as a message in the JSON blob, Logs Explorer just displays an empty string, instead of showing the JSON...

The new access log lines look like

{"level":"info","log_type":"access","remote_addr":"::ffff:127.0.0.1","request":"GET /__heartbeat__ HTTP/1.1","request_time":"1.913","status":"200","timestamp":"2024-04-10T14:15:23.974Z","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:126.0) Gecko/20100101 Firefox/126.0"}

Which is still the same, except that there's no more "message":"".