summaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-17 02:14:44 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-17 02:14:44 +0000
commitbf6724c049ba0f156544c49aab2008d6280e5ffa (patch)
tree0c56caccf906b87575dfefe52acc526f38c1fc81 /src/logger.cpp
parent62a1eab66838294f2b88d5ea94c1678c167d6189 (diff)
Rewrite ConfigReader again
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11879 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/logger.cpp')
-rw-r--r--src/logger.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index e2baa4b8d..c9b1cf9e4 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -11,8 +11,6 @@
* ---------------------------------------------------
*/
-/* $Core */
-
#include "inspircd.h"
#include "filelogger.h"
@@ -73,15 +71,18 @@ void LogManager::OpenFileLogs()
ConfigReader* Conf = new ConfigReader;
std::map<std::string, FileWriter*> logmap;
std::map<std::string, FileWriter*>::iterator i;
- for (int index = 0; index < Conf->Enumerate("log"); ++index)
+ for (int index = 0;; ++index)
{
- std::string method = Conf->ReadValue("log", "method", index);
+ ConfigTag* tag = ServerInstance->Config->ConfValue("log", index);
+ if (!tag)
+ break;
+ std::string method = tag->getString("method");
if (method != "file")
{
continue;
}
- std::string type = Conf->ReadValue("log", "type", index);
- std::string level = Conf->ReadValue("log", "level", index);
+ std::string type = tag->getString("type");
+ std::string level = tag->getString("level");
int loglevel = DEFAULT;
if (level == "debug" || ServerInstance->Config->forcedebug)
{