companionstudio / islay

A Rails engine which forms the base for a website back-end.
MIT License
0 stars 0 forks source link

Improve Event Logging #23

Open lukesutton opened 11 years ago

lukesutton commented 11 years ago

Currently event logs are generated using a big union across multiple queries.

This sucks for a couple of reasons. Firstly, it's brittle. A single mis-configured sub-query can hose the whole list of logs. Secondly, performance is miserable. Initially it's OK, but doubtless it'll fall over. Lastly, it discourages fine grained logging, which would go a long way to debugging and a general, solid overview of islay.

Logs should be in their own table. Payload should be a hstore or JSON object. That's it. We can have sugar to wrap them, but otherwise it's pretty simple.