Using Database to store log message.