Advertisement
ddto

Untitled

Aug 11th, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.92 KB | None | 0 0
  1. #pragma once
  2.  
  3. // use this for logging, not console directly
  4.  
  5. #include "Types.h"
  6. #include "Console.h"
  7.  
  8. namespace spc
  9. {
  10.     namespace log
  11.     {
  12.         inline void Output(const String& str)
  13.         {
  14.             con::Print(str);
  15.         }
  16.  
  17.         inline void Debug(const String& str)
  18.         {
  19.             #if _DEBUG
  20.             con::PrintN(con::SetStringColor("[DEBUG]   " + str, con::BLUE, con::NONE));
  21.             #endif
  22.         }
  23.  
  24.         inline void Info(const String& str)
  25.         {
  26.             con::PrintN(con::SetStringColor("[INFO]    " + str, con::GREEN, con::NONE));
  27.         }
  28.  
  29.         inline void Warning(const String& str)
  30.         {
  31.             con::PrintN(con::SetStringColor("[WARNING] " + str, con::BLACK, con::YELLOW));
  32.         }
  33.  
  34.         inline void Error(const String& str)
  35.         {
  36.             con::PrintN(con::SetStringColor("[ERROR]   " + str, con::WHITE, con::RED));
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement