implement a logging framework

is the SQL lib already in the dependency list of the deb? have you tested that?