diff --git a/inferno/src/inferno/log.h b/inferno/src/inferno/log.h index 335756e..0e91a43 100644 --- a/inferno/src/inferno/log.h +++ b/inferno/src/inferno/log.h @@ -4,6 +4,7 @@ #include // sprintf, printf #include // strlen #include // shared_ptr +#include // string namespace Inferno { @@ -39,31 +40,37 @@ namespace Inferno { } template - void log(const char* format, A... arguments) + void print(const char* color, std::string format, A... arguments) + { + this->print(color, format.c_str(), arguments...); + } + + template + void log(T format, A... arguments) { this->print("", format, arguments...); } - template - void info(const char* format, A... arguments) + template + void info(T format, A... arguments) { this->print("\x1B[34m", format, arguments...); } - template - void warn(const char* format, A... arguments) + template + void warn(T format, A... arguments) { this->print("\x1B[33m", format, arguments...); } - template - void danger(const char* format, A... arguments) + template + void danger(T format, A... arguments) { this->print("\x1B[31m", format, arguments...); } - template - void success(const char* format, A... arguments) + template + void success(T format, A... arguments) { this->print("\x1B[32m", format, arguments...); }