Added mysql log functions
Added ability specify kind as a parameter