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:
parent
e5b6a9d5bb
commit
a91be40d4a
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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()));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user