Simple write to db function for LogDb