Changeset 675
- Timestamp:
- 10/23/06 19:01:53 (2 years ago)
- Files:
-
- nepenthes/trunk/modules/log-irc/log-irc.cpp (modified) (1 diff)
- nepenthes/trunk/nepenthes-core/include/LogManager.hpp (modified) (1 diff)
- nepenthes/trunk/nepenthes-core/src/LogManager.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nepenthes/trunk/modules/log-irc/log-irc.cpp
r550 r675 232 232 bool LogIrc::Exit() 233 233 { 234 if (g_Nepenthes->getLogMgr()->delLogger(this) == true) 235 { 236 logDebug("Unregisterd from logmanager\n"); 237 }else 238 { 239 logWarn("Could not unregister from logmanager\n"); 240 } 234 241 return true; 235 242 } nepenthes/trunk/nepenthes-core/include/LogManager.hpp
r652 r675 56 56 void registerTag(uint32_t bit, const char *tag); 57 57 virtual void addLogger(LogHandler *lh, uint32_t filterMask); 58 virtual bool delLogger(LogHandler *lh); 58 59 virtual void log(uint32_t mask, const char *message); 59 60 virtual void logf(uint32_t mask, const char *format, ...); nepenthes/trunk/nepenthes-core/src/LogManager.cpp
r652 r675 122 122 } 123 123 124 bool LogManager::delLogger(LogHandler *lh) 125 { 126 list<LogHandlerEntry *>::iterator it; 127 for( it = m_Loggers.begin(); it != m_Loggers.end(); it++ ) 128 { 129 if ((*it)->m_Lh == lh) 130 { 131 m_Loggers.erase(it); 132 delete *it; 133 return true; 134 } 135 } 136 return false; 137 } 124 138 125 139 /**
