Separate interface for logging sqls

Separate interface for logging sqls