better logging for server module and mysql module