Logging and Database API definition