====== Logging Event data into a SQL Database ====== Indigo has the ability to log data into either SQLite databases (10.5 or greater) or PostgreSQL databases. You can choose to log device changes, variable changes, and/or event log data. The latter can generate quite a large amount of data, and the client doesn't attempt to delete any data, so you'll need to periodically purge data yourself. ==== SQLite Configuration ==== In Indigo Pro on Leopard (10.5.x) systems, the SQLite libraries are built-in, so having Indigo log into a SQLite database is [[wiki:How-to level of difficulty#simple|Simple]]: - Open the config file (/Library/Application Support/Perceptive Automation/Indigo 4/IndigoSqlClient/IndigoSqlClient.conf) in your favorite text editor and make sure that database_type = sqlite. You can also specify what is written out to the database: by default, device changes and variable changes are logged (they have a non-zero value) and all events in the event log are NOT logged (it is set to zero). You can also change the name of the database (default is sqlite_db), but it's not recommended. //NOTE: the database file is stored in the same directory as the config file//. Save any changes you made. - Turn on the ''**Log Device state history to SQLite or PostgreSQL**'' option in the ''**Start Local Server...**'' dialog from the ''**Indigo 4**'' menu \\ ==== PostgreSQL Configuration ==== Follow [[https://forums.indigodomo.com/viewtopic.php?p=15030#15030|these directions]] to enable PostgreSQL logging. This [[wiki:How-to level of difficulty]] is [[wiki:How-to level of difficulty#hard|Hard]].