diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-05-20 09:26:47 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-05-20 09:26:47 +0000 |
commit | c548f6899f0d188ef3a5a3d7abbb3b32e9addaa6 (patch) | |
tree | b5687ca854f5eb086f37ef227eea7733d2a3c3f3 /src/dalstorage.cpp | |
parent | 149efe91e50bf0e298761bb941e20ce4d8362314 (diff) | |
download | manaserv-c548f6899f0d188ef3a5a3d7abbb3b32e9addaa6.tar.gz manaserv-c548f6899f0d188ef3a5a3d7abbb3b32e9addaa6.tar.bz2 manaserv-c548f6899f0d188ef3a5a3d7abbb3b32e9addaa6.tar.xz manaserv-c548f6899f0d188ef3a5a3d7abbb3b32e9addaa6.zip |
Changed ConnectionHandler and NetComputer into low-level base classes;
they are overloaded by client-aware classes. Forced statement syntax for
loggers.
Diffstat (limited to 'src/dalstorage.cpp')
-rw-r--r-- | src/dalstorage.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/dalstorage.cpp b/src/dalstorage.cpp index cb0f87dc..b86219dc 100644 --- a/src/dalstorage.cpp +++ b/src/dalstorage.cpp @@ -83,7 +83,7 @@ DALStorage::open(void) mDb->connect(getName(), getUser(), getPassword()); if (!dbFileShown) { - LOG_INFO("Using " << dbFile << " as Database Name.", 0) + LOG_INFO("Using " << dbFile << " as Database Name.", 0); dbFileShown = true; } #elif defined (SQLITE_SUPPORT) @@ -92,7 +92,7 @@ DALStorage::open(void) mDb->connect(dbFile, "", ""); if (!dbFileShown) { - LOG_INFO("SQLite uses ./" << dbFile << " as DB.", 0) + LOG_INFO("SQLite uses ./" << dbFile << " as DB.", 0); dbFileShown = true; } #endif @@ -138,10 +138,10 @@ DALStorage::open(void) createTable(CHANNELS_TBL_NAME, SQL_CHANNELS_TABLE); } catch (const DbConnectionFailure& e) { - LOG_ERROR("unable to connect to the database: " << e.what(), 0) + LOG_ERROR("unable to connect to the database: " << e.what(), 0); } catch (const DbSqlQueryExecFailure& e) { - LOG_ERROR("SQL query failure: " << e.what(), 0) + LOG_ERROR("SQL query failure: " << e.what(), 0); } mIsOpen = mDb->isConnected(); @@ -229,7 +229,7 @@ DALStorage::getAccount(const std::string& userName) Beings beings; LOG_INFO(userName << "'s account has " << charInfo.rows() - << " character(s) in database.", 1) + << " 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 @@ -305,7 +305,7 @@ void DALStorage::addAccount(const AccountPtr& account) { if (account.get() == 0) { - LOG_WARN("Cannot add a NULL Account.", 0) + LOG_WARN("Cannot add a NULL Account.", 0); // maybe we should throw an exception instead return; } @@ -367,7 +367,7 @@ DALStorage::delAccount(const std::string& userName) } catch (const dal::DbSqlQueryExecFailure& e) { // TODO: throw an exception. - LOG_ERROR("SQL query failure: " << e.what(), 0) + LOG_ERROR("SQL query failure: " << e.what(), 0); } } @@ -480,7 +480,7 @@ DALStorage::doesCharacterNameExists(const std::string& name) } catch (const dal::DbSqlQueryExecFailure& e) { // TODO: throw an exception. - LOG_ERROR("SQL query failure: " << e.what(), 0) + LOG_ERROR("SQL query failure: " << e.what(), 0); } return false; @@ -555,7 +555,7 @@ DALStorage::getChannelList() channelInfo(i,3)))); LOG_DEBUG("Channel (" << channelInfo(i,0) << ") loaded: " << channelInfo(i,1) - << ": " << channelInfo(i,2), 5) + << ": " << channelInfo(i,2), 5); } return channels; @@ -606,7 +606,7 @@ DALStorage::updateChannels(std::map<short, ChatChannel>& channelList) << i->second.getPassword() << "\");"; LOG_DEBUG("Channel (" << i->first << ") saved: " << i->second.getName() - << ": " << i->second.getAnnouncement(), 5) + << ": " << i->second.getAnnouncement(), 5); } mDb->execSql(sql.str()); |