A query/logging framework for Erlang