/
How to enable Database Logging

How to enable Database Logging

Within the configuration file of CardExchange® Visitor is a commented out section as shown in green below:

<entityFramework> 
	<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> 
	<providers> 
		<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> 
		<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" /> 
		<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" /> 
	</providers> 
	<!--<interceptors> 
		<interceptor type="System.Data.Entity.Infrastructure.Interception.DatabaseLogger, EntityFramework"> 
			<parameters> 
				<parameter value="C:\Users\Public\Documents\VisitorExchange\VisitorExchange.log"/> 
			</parameters> 
		</interceptor> 
	</interceptors>--> 
</entityFramework>

Uncommenting this section will cause all database queries to be logged to the specified file. CardExchange® Visitor produces a lot of SQL queries so database logging is disabled by default, but if there are any issues you can enable logging to help identify the problem.

The default location for the configuration file of CardExchange® Visitor is below:

C:\Program Files (x86)\CardExchange Solutions\CardExchange Visitor\VisitorExchange.exe.config

Related content

Technote 16/16 - Enable database logging
Technote 16/16 - Enable database logging
More like this
DbProviderFactories Section
DbProviderFactories Section
More like this
CardExchange Configuration File
CardExchange Configuration File
More like this
Error: The Underlying Provider Failed to Open - Unable to Open Database File (Startup Error)
Error: The Underlying Provider Failed to Open - Unable to Open Database File (Startup Error)
More like this
Technote 17/04 - Dbproviderfactories section
Technote 17/04 - Dbproviderfactories section
More like this
Visitors View - Visitors Pane
Visitors View - Visitors Pane
More like this