diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/eina/src/include/eina_log.h | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/eina/src/include/eina_log.h')
-rw-r--r-- | libraries/eina/src/include/eina_log.h | 51 |
1 files changed, 33 insertions, 18 deletions
diff --git a/libraries/eina/src/include/eina_log.h b/libraries/eina/src/include/eina_log.h index 5cd7c59..186397d 100644 --- a/libraries/eina/src/include/eina_log.h +++ b/libraries/eina/src/include/eina_log.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <stdlib.h> | 22 | #include <stdlib.h> |
23 | #include <stdarg.h> | 23 | #include <stdarg.h> |
24 | #include <sys/types.h> | ||
24 | 25 | ||
25 | #include "eina_types.h" | 26 | #include "eina_types.h" |
26 | 27 | ||
@@ -297,22 +298,27 @@ EAPI extern int EINA_LOG_DOMAIN_GLOBAL; | |||
297 | * paths. Never define @c EINA_LOG_LEVEL_MAXIMUM on public | 298 | * paths. Never define @c EINA_LOG_LEVEL_MAXIMUM on public |
298 | * header files. | 299 | * header files. |
299 | */ | 300 | */ |
300 | #ifdef EINA_LOG_LEVEL_MAXIMUM | 301 | #ifdef EINA_ENABLE_LOG |
301 | #define EINA_LOG(DOM, LEVEL, fmt, ...) \ | 302 | # ifdef EINA_LOG_LEVEL_MAXIMUM |
302 | do { \ | 303 | # define EINA_LOG(DOM, LEVEL, fmt, ...) \ |
303 | if (LEVEL <= EINA_LOG_LEVEL_MAXIMUM) { \ | 304 | do { \ |
304 | eina_log_print(DOM, LEVEL, __FILE__, __FUNCTION__, __LINE__, \ | 305 | if (LEVEL <= EINA_LOG_LEVEL_MAXIMUM) { \ |
305 | fmt, ## __VA_ARGS__); } \ | 306 | eina_log_print(DOM, LEVEL, __FILE__, __FUNCTION__, __LINE__, \ |
306 | } while (0) | 307 | fmt, ## __VA_ARGS__); } \ |
307 | #else | 308 | } while (0) |
308 | #define EINA_LOG(DOM, LEVEL, fmt, ...) \ | 309 | # else |
309 | eina_log_print(DOM, \ | 310 | # define EINA_LOG(DOM, LEVEL, fmt, ...) \ |
310 | LEVEL, \ | 311 | eina_log_print(DOM, \ |
311 | __FILE__, \ | 312 | LEVEL, \ |
312 | __FUNCTION__, \ | 313 | __FILE__, \ |
313 | __LINE__, \ | 314 | __FUNCTION__, \ |
314 | fmt, \ | 315 | __LINE__, \ |
316 | fmt, \ | ||
315 | ## __VA_ARGS__) | 317 | ## __VA_ARGS__) |
318 | # endif | ||
319 | #else | ||
320 | #define EINA_LOG(DOM, LEVEL, fmt, ...) \ | ||
321 | do { (void) DOM; (void) LEVEL; (void) fmt; } while (0) | ||
316 | #endif | 322 | #endif |
317 | 323 | ||
318 | /** | 324 | /** |
@@ -726,7 +732,7 @@ EAPI void eina_log_domain_unregister(int domain); | |||
726 | * specified value (eina_log_level_set() or environment | 732 | * specified value (eina_log_level_set() or environment |
727 | * variables EINA_LOG_LEVEL, EINA_LOG_LEVELS) will be ignored. | 733 | * variables EINA_LOG_LEVEL, EINA_LOG_LEVELS) will be ignored. |
728 | * @param file filename that originated the call, must @b not be @c NULL. | 734 | * @param file filename that originated the call, must @b not be @c NULL. |
729 | * @param fnc function that originated the call, must @b not be @c NULL. | 735 | * @param function function that originated the call, must @b not be @c NULL. |
730 | * @param line originating line in @a file. | 736 | * @param line originating line in @a file. |
731 | * @param fmt printf-like format to use. Should not provide trailing | 737 | * @param fmt printf-like format to use. Should not provide trailing |
732 | * '\n' as it is automatically included. | 738 | * '\n' as it is automatically included. |
@@ -780,7 +786,7 @@ EAPI void eina_log_vprint(int domain, | |||
780 | */ | 786 | */ |
781 | 787 | ||
782 | /** | 788 | /** |
783 | * Alternative logging method, this will output to standard output stream. | 789 | * @brief Alternative logging method, this will output to standard output stream. |
784 | * | 790 | * |
785 | * @param d The domain. | 791 | * @param d The domain. |
786 | * @param level The level. | 792 | * @param level The level. |
@@ -815,7 +821,16 @@ EAPI void eina_log_print_cb_stdout(const Eina_Log_Domain *d, | |||
815 | va_list args); | 821 | va_list args); |
816 | 822 | ||
817 | /** | 823 | /** |
818 | * Default logging method, this will output to standard error stream. | 824 | * @brief Default logging method, this will output to standard error stream. |
825 | * | ||
826 | * @param d The domain. | ||
827 | * @param level The level. | ||
828 | * @param file The file which is logged. | ||
829 | * @param fnc The function which is logged. | ||
830 | * @param line The line which is logged. | ||
831 | * @param fmt The ouptut format to use. | ||
832 | * @param data Not used. | ||
833 | * @param args The arguments needed by the format. | ||
819 | * | 834 | * |
820 | * This method will colorize output based on domain provided color and | 835 | * This method will colorize output based on domain provided color and |
821 | * message logging level. | 836 | * message logging level. |