diff --git a/README.md b/README.md index cdd93c74..1df45422 100644 --- a/README.md +++ b/README.md @@ -578,7 +578,7 @@ ecs::Query q2 = w.query() ``` ### Uncached query -From the implementation standpoint, uncached queries are the same as ordinary queries in all but one aspect - they do not use the query cache internally. This means that two uncached queries using the same setup are going to evaluate matches separately. As a result, if there are duplicates, more memory and performance is be wasted. +From the implementation standpoint, uncached queries are the same as ordinary queries in all but one aspect - they do not use the query cache internally. This means that two uncached queries using the same setup are going to evaluate matches separately. As a result, if there are duplicates, more memory and performance will be wasted. On the other hand, if you design your queries carefully and they are all different, uncached queries are actually a bit faster to create and match. Creation is faster because there is no hash to compute for the query and matching is faster because no query cache lookups are involved. diff --git a/include/gaia/config/logging.h b/include/gaia/config/logging.h index 4361d9d0..85377d3c 100644 --- a/include/gaia/config/logging.h +++ b/include/gaia/config/logging.h @@ -6,9 +6,9 @@ #ifndef GAIA_LOG_D #define GAIA_LOG_D(...) \ { \ - fprintf(stdout, "%s %s, D: ", __DATE__, __TIME__); \ + fprintf(stdout, "\033[1;32m%s %s, D: ", __DATE__, __TIME__); \ fprintf(stdout, __VA_ARGS__); \ - fprintf(stdout, "\n"); \ + fprintf(stdout, "\033[0m\n"); \ } #endif @@ -26,9 +26,9 @@ #ifndef GAIA_LOG_W #define GAIA_LOG_W(...) \ { \ - fprintf(stdout, "%s %s, W: ", __DATE__, __TIME__); \ + fprintf(stderr, "\033[1;33m%s %s, W: ", __DATE__, __TIME__); \ fprintf(stderr, __VA_ARGS__); \ - fprintf(stderr, "\n"); \ + fprintf(stderr, "\033[0m\n"); \ } #endif @@ -36,8 +36,8 @@ #ifndef GAIA_LOG_E #define GAIA_LOG_E(...) \ { \ - fprintf(stdout, "%s %s, E: ", __DATE__, __TIME__); \ + fprintf(stderr, "\033[1;31m%s %s, E: ", __DATE__, __TIME__); \ fprintf(stderr, __VA_ARGS__); \ - fprintf(stderr, "\n"); \ + fprintf(stderr, "\033[0m\n"); \ } #endif \ No newline at end of file diff --git a/single_include/gaia.h b/single_include/gaia.h index cb8e2d6e..2a45656b 100644 --- a/single_include/gaia.h +++ b/single_include/gaia.h @@ -847,9 +847,9 @@ namespace gaia { #ifndef GAIA_LOG_D #define GAIA_LOG_D(...) \ { \ - fprintf(stdout, "%s %s, D: ", __DATE__, __TIME__); \ + fprintf(stdout, "\033[1;32m%s %s, D: ", __DATE__, __TIME__); \ fprintf(stdout, __VA_ARGS__); \ - fprintf(stdout, "\n"); \ + fprintf(stdout, "\033[0m\n"); \ } #endif @@ -867,9 +867,9 @@ namespace gaia { #ifndef GAIA_LOG_W #define GAIA_LOG_W(...) \ { \ - fprintf(stdout, "%s %s, W: ", __DATE__, __TIME__); \ + fprintf(stderr, "\033[1;33m%s %s, W: ", __DATE__, __TIME__); \ fprintf(stderr, __VA_ARGS__); \ - fprintf(stderr, "\n"); \ + fprintf(stderr, "\033[0m\n"); \ } #endif @@ -877,9 +877,9 @@ namespace gaia { #ifndef GAIA_LOG_E #define GAIA_LOG_E(...) \ { \ - fprintf(stdout, "%s %s, E: ", __DATE__, __TIME__); \ + fprintf(stderr, "\033[1;31m%s %s, E: ", __DATE__, __TIME__); \ fprintf(stderr, __VA_ARGS__); \ - fprintf(stderr, "\n"); \ + fprintf(stderr, "\033[0m\n"); \ } #endif