diff --git a/include/ekg/io/log.hpp b/include/ekg/io/log.hpp index 46357963..d67e9ee7 100644 --- a/include/ekg/io/log.hpp +++ b/include/ekg/io/log.hpp @@ -4,6 +4,8 @@ #include #include +#define EKG_LOG_DEBUG + namespace ekg { class log { public: @@ -41,6 +43,11 @@ namespace ekg { std::terminate(); } } + public: + template + explicit log(t content) { + std::cout << content << std::endl; + } explicit log() { ekg::log::buffered = true; @@ -49,11 +56,9 @@ namespace ekg { ~log() { ekg::log::buffer << '\n'; - //#define EKG_LOG_DEBUG #ifdef EKG_LOG_DEBUG ekg::log::buffered = true; ekg::log::flush(); - ekg_log(""); #endif } @@ -100,4 +105,4 @@ namespace ekg { ); } -#endif \ No newline at end of file +#endif diff --git a/test/src/ekg_gui_showcase_test.cpp b/test/src/ekg_gui_showcase_test.cpp index 5a931f75..a4cb78cb 100644 --- a/test/src/ekg_gui_showcase_test.cpp +++ b/test/src/ekg_gui_showcase_test.cpp @@ -6,6 +6,9 @@ application_t app {}; int32_t main(int32_t, char**) { + ekg::log("blalblla"); + ekg::log(2); + SDL_Init(SDL_INIT_VIDEO); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);