Comparison

util/sql.lua @ 6764:9f2b1e0bba90

util.sql: Log debug message when connecting to database
author Matthew Wild <mwild1@gmail.com>
date Wed, 08 Jul 2015 15:15:32 +0100
parent 6763:e961ac4efbb3
child 6765:0cbb09afa5c3
comparison
equal deleted inserted replaced
6763:e961ac4efbb3 6764:9f2b1e0bba90
99 function engine:connect() 99 function engine:connect()
100 if self.conn then return true; end 100 if self.conn then return true; end
101 101
102 local params = self.params; 102 local params = self.params;
103 assert(params.driver, "no driver") 103 assert(params.driver, "no driver")
104 log("error", "Connecting to [%s] %s...", params.driver, params.database);
104 local dbh, err = DBI.Connect( 105 local dbh, err = DBI.Connect(
105 params.driver, params.database, 106 params.driver, params.database,
106 params.username, params.password, 107 params.username, params.password,
107 params.host, params.port 108 params.host, params.port
108 ); 109 );