Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Log.cpp 435B

123456789101112131415161718192021222324
  1. /*!
  2. * \file src/Log.cpp
  3. * \brief Global Logging Utility
  4. *
  5. * \author xythobuz
  6. */
  7. #include "global.h"
  8. #include "Log.h"
  9. std::vector<LogLevel> Log::logs;
  10. std::vector<LogEntry> Log::wholeLog;
  11. void Log::initialize() {
  12. for (int i = 0; i < LOG_COUNT; i++)
  13. logs.emplace_back(i);
  14. }
  15. LogLevel& Log::get(int level) {
  16. orAssertGreaterThanEqual(level, 0);
  17. orAssertLessThan(level, LOG_COUNT);
  18. return logs.at(level);
  19. }