CARLsim  6.1.0
CARLsim: a GPU-accelerated SNN simulator
Logger.cpp
Go to the documentation of this file.
1 #include "Logger.h"
2 #include <stdexcept>
3 #include <string>
4 #include <cassert>
5 #include <typeinfo>
6 #include <ostream>
7 
8 Logger::Logger(const Level level, std::ostream &logStream)
9 : loggerLevel(level), logStream(logStream) {}
10 
11 void Logger::log(const Level messageLevel, const char * const message) {
12  assert(message != NULL);
13  if (messageLevel >= loggerLevel)
14  logStream << message << std::endl;
15 }
16 
17 Logger::Level Logger::getLevel() { return loggerLevel; }
virtual void log(const Level level, const char *const message)
Definition: Logger.cpp:11
Logger(const Level level, std::ostream &logStream=std::cout)
Definition: Logger.cpp:8
Level
Definition: Logger.h:12
Level getLevel()
Definition: Logger.cpp:17