Log.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. Copyright (c) 2016 Hubert Denkmair <hubert@denkmair.de>
  3. This file is part of cangaroo.
  4. cangaroo is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 2 of the License, or
  7. (at your option) any later version.
  8. cangaroo is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with cangaroo. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #pragma once
  16. #include <QDateTime>
  17. typedef enum log_level {
  18. log_level_debug,
  19. log_level_info,
  20. log_level_warning,
  21. log_level_error,
  22. log_level_critical,
  23. log_level_fatal
  24. } log_level_t;
  25. void log_msg(const QDateTime dt, const log_level_t level, const QString msg);
  26. void log_msg(const log_level_t level, const QString msg);
  27. void log_debug(const QString msg);
  28. void log_info(const QString msg);
  29. void log_warning(const QString msg);
  30. void log_error(const QString msg);
  31. void log_critical(const QString msg);
  32. void log_fatal(const QString msg);