Normally, you would try to read a connection string from Web.Config by using its name:
<connectionStrings>
<add name="LoggingDatabase" connectionString="Database=XXX;Data Source=XXX;Initial Catalog=XXX;Integrated Security=True"/>
You appear to be trying to retrieve a connection string by using the string itself as the name...which is why you get the error, it doesn't exist so it returns null.