summaryrefslogtreecommitdiffstats
path: root/src/dalstorage.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-12-20 21:08:00 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-12-20 21:08:00 +0000
commitc390ec7befcfeeda8504bdd74eb823b7ab721bf3 (patch)
treead1c0164748a96ea5cb0a9b546585b7dd1c371f2 /src/dalstorage.cpp
parent609d235de3435fdc768207e59a2ee85172f291ba (diff)
downloadmanaserv-c390ec7befcfeeda8504bdd74eb823b7ab721bf3.tar.gz
manaserv-c390ec7befcfeeda8504bdd74eb823b7ab721bf3.tar.xz
manaserv-c390ec7befcfeeda8504bdd74eb823b7ab721bf3.zip
Adding command line argument parsing and log verbosity level handling.
Diffstat (limited to 'src/dalstorage.cpp')
-rw-r--r--src/dalstorage.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/dalstorage.cpp b/src/dalstorage.cpp
index 1a9a514..fc3a70d 100644
--- a/src/dalstorage.cpp
+++ b/src/dalstorage.cpp
@@ -81,7 +81,7 @@ DALStorage::open(void)
mDb->connect(getName(), getUser(), getPassword());
if (!dbFileShown)
{
- LOG_INFO("Using " << dbFile << " as Database Name.")
+ LOG_INFO("Using " << dbFile << " as Database Name.", 0)
dbFileShown = true;
}
#elif defined (SQLITE_SUPPORT)
@@ -90,7 +90,7 @@ DALStorage::open(void)
mDb->connect(dbFile, "", "");
if (!dbFileShown)
{
- LOG_INFO("SQLite uses ./" << dbFile << " as DB.")
+ LOG_INFO("SQLite uses ./" << dbFile << " as DB.", 0)
dbFileShown = true;
}
#endif
@@ -135,10 +135,10 @@ DALStorage::open(void)
createTable(INVENTORIES_TBL_NAME, SQL_INVENTORIES_TABLE);
}
catch (const DbConnectionFailure& e) {
- LOG_ERROR("unable to connect to the database: " << e.what())
+ LOG_ERROR("unable to connect to the database: " << e.what(), 0)
}
catch (const DbSqlQueryExecFailure& e) {
- LOG_ERROR("SQL query failure: " << e.what())
+ LOG_ERROR("SQL query failure: " << e.what(), 0)
}
mIsOpen = mDb->isConnected();
@@ -225,8 +225,8 @@ DALStorage::getAccount(const std::string& userName)
if (!charInfo.isEmpty()) {
Beings beings;
- std::cout << userName << "'s account has " << charInfo.rows()
- << " character(s) in database." << std::endl;
+ LOG_INFO(userName << "'s account has " << charInfo.rows()
+ << " character(s) in database.", 1)
// As the recordset functions are set to be able to get one recordset
// at a time, we store charInfo in a temp array of strings
@@ -365,7 +365,7 @@ DALStorage::delAccount(const std::string& userName)
}
catch (const dal::DbSqlQueryExecFailure& e) {
// TODO: throw an exception.
- LOG_ERROR("SQL query failure: " << e.what())
+ LOG_ERROR("SQL query failure: " << e.what(), 0)
}
}
@@ -398,7 +398,7 @@ DALStorage::getEmailList()
}
catch (const dal::DbSqlQueryExecFailure& e) {
// TODO: throw an exception.
- LOG_ERROR("SQL query failure: " << e.what())
+ LOG_ERROR("SQL query failure: " << e.what(), 0)
}
return emailList;
@@ -441,7 +441,7 @@ DALStorage::doesEmailAlreadyExists(std::string email)
}
catch (const dal::DbSqlQueryExecFailure& e) {
// TODO: throw an exception.
- LOG_ERROR("SQL query failure: " << e.what())
+ LOG_ERROR("SQL query failure: " << e.what(), 0)
}
return false;
@@ -485,7 +485,7 @@ DALStorage::doesCharacterNameExists(std::string name)
}
catch (const dal::DbSqlQueryExecFailure& e) {
// TODO: throw an exception.
- LOG_ERROR("SQL query failure: " << e.what())
+ LOG_ERROR("SQL query failure: " << e.what(), 0)
}
return false;