liqd / aula

An online platform for political participation in schools in Germany (not in active development)
https://liqd.net
Other
27 stars 5 forks source link

Log user page access and errors. #939

Closed andorp closed 8 years ago

andorp commented 8 years ago

Partly fixes: #915

andorp commented 8 years ago

We should introduce a new type class to transform values to log message parts and hide sensual information from. I would do that in a different pull request.

The snippet below shows a debug level log:

2016-08-01 15:46:06.777596 UTC [DEBUG] daemon [logger] recieved a message.
2016-08-01 15:46:06.778015 UTC [WARN] [anonym] Not logged in
2016-08-01 15:46:06.782899 UTC [DEBUG] daemon [logger] recieved a message.
2016-08-01 15:46:06.791325 UTC [INFO] [anonym] access to page PageHomeWithLoginPrompt
2016-08-01 15:46:09.885089 UTC [DEBUG] daemon [logger] recieved a message.
2016-08-01 15:46:09.885829 UTC [DEBUG] [xd1yDlnwPX0bUAeRK172WePz] form processed for PageHomeWithLoginPrompt
2016-08-01 15:46:09.894083 UTC [DEBUG] daemon [logger] recieved a message.
2016-08-01 15:46:09.895378 UTC [INFO] [xd1yDlnwPX0bUAeRK172WePz] access to page PageUserSettings
2016-08-01 15:46:09.895728 UTC [DEBUG] daemon [logger] recieved a message.
2016-08-01 15:46:09.896001 UTC [INFO] [xd1yDlnwPX0bUAeRK172WePz] gets access to FormPageRep PageUserSettings
2016-08-01 15:46:11.590972 UTC [DEBUG] daemon [logger] recieved a message.
2016-08-01 15:46:11.593275 UTC [INFO] [xd1yDlnwPX0bUAeRK172WePz] gets access to PageOverviewOfSpaces
2016-08-01 15:46:12.362875 UTC [DEBUG] daemon [logger] recieved a message.
2016-08-01 15:46:12.38825 UTC [INFO] [xd1yDlnwPX0bUAeRK172WePz] gets access to PageOverviewOfWildIdeas
2016-08-01 15:46:13.747441 UTC [DEBUG] daemon [logger] recieved a message.
2016-08-01 15:46:13.776825 UTC [INFO] [xd1yDlnwPX0bUAeRK172WePz] gets access to ViewIdea
2016-08-01 15:46:18.758726 UTC [DEBUG] daemon [logger] recieved a message.
2016-08-01 15:46:18.760478 UTC [ERROR] [xd1yDlnwPX0bUAeRK172WePz] PersistError404 {persistErrorMessage = "Idea"}
fisx commented 8 years ago

Lots of noise from me (sorry), but LGTM. This is a big improvement over the current status, thanks!

@andorp can be merged if you and travis are green.

andorp commented 8 years ago

LGTM