Swirrl / drafter

A clojure service and a client to it for exposing data management operations to PMD
Other
0 stars 0 forks source link

Better logging of changes #204

Open BillSwirrl opened 7 years ago

BillSwirrl commented 7 years ago

Trying to work out what happened in http://swirrl.freshdesk.com/helpdesk/tickets/219 proved to be very difficult in the current drafter.log. This is a case where it seems likely that the user got mixed up about what was in a draft and accidentally published something without meaning to, alongside some intended changes.

The key actions are in the drafter log, but there is so much stuff in there that it's quite difficult to find, and the logs cycle very quickly, so don't go very far back.

It might be useful to keep a separate additional log of a subset of key events - eg someone creating a draft, making a change to a dataset or vocab in a graph, submitting a draft, publishing a draft - to give us a better way of tracking who changed what and when. That could of course become the basis for exposing an audit trail in the admin UI in future.

RickMoynihan commented 7 years ago

We can probably look at doing this already entirely through logging config. We "simply" need to set up a new appender to a different file e.g. /logs/draftset-operations.log and direct logs from the relevant namespaces to it. We might want to adjust some log levels etc to make this more convenient.

I think logging like this is unlikely to be a basis for an audit trail feature, as we'd likely just keep information around in the state graph and want to augment it with extra metadata.