1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-20 21:54:20 +01:00

Refactored. Db log gets name after synclib + db now.

This commit is contained in:
Olov Danielson 2010-01-14 13:45:44 +00:00
parent e5b6a9d5bb
commit a91be40d4a
3 changed files with 5 additions and 4 deletions

View File

@ -56,14 +56,14 @@ class Db
* @return void
*
*/
public function __construct($db_dsn, $db_username, $db_password, $dp_options)
public function __construct($db_dsn, $db_username, $db_password, $dp_options, $name='ykval-db')
{
$this->db_dsn=$db_dsn;
$this->db_username=$db_username;
$this->db_password=$db_password;
$this->db_options=$db_options;
$this->myLog=new Log('ykval-db');
$this->myLog=new Log($name);
}
function addField($name, $value)

View File

@ -40,7 +40,7 @@ require_once 'ykval-log.php';
System_Daemon::start(); // Spawn Deamon!
/* Application start */
$sl = new SyncLib('queue-synclib');
$sl = new SyncLib('ykval-queue:synclib');
# Loop forever and resync

View File

@ -19,7 +19,8 @@ class SyncLib
$this->db=new Db($baseParams['__YKVAL_DB_DSN__'],
$baseParams['__YKVAL_DB_USER__'],
$baseParams['__YKVAL_DB_PW__'],
$baseParams['__YKVAL_DB_OPTIONS__']);
$baseParams['__YKVAL_DB_OPTIONS__'],
$logname . ':db');
$this->isConnected=$this->db->connect();
$this->server_nonce=md5(uniqid(rand()));