forked from enlightenment/efl
eolian: no need for printf-style for internal log funcs
This commit is contained in:
parent
a1ae5cd918
commit
7c6d8010a8
|
@ -6,7 +6,7 @@
|
|||
#include <stdarg.h>
|
||||
|
||||
static inline void _eolian_log_line(const char *file, int line, int column, const char *str) EINA_ARG_NONNULL(1, 4);
|
||||
static inline void _eolian_log(const char *fmt, ...) EINA_ARG_NONNULL(1) EINA_PRINTF(1, 2);
|
||||
static inline void _eolian_log(const char *str) EINA_ARG_NONNULL(1);
|
||||
|
||||
static inline void
|
||||
_eolian_log_line(const char *file, int line, int column, const char *str)
|
||||
|
@ -25,27 +25,17 @@ _eolian_log_line(const char *file, int line, int column, const char *str)
|
|||
}
|
||||
|
||||
static inline void
|
||||
_eolian_log(const char *fmt, ...)
|
||||
_eolian_log(const char *str)
|
||||
{
|
||||
Eina_Strbuf *sb = eina_strbuf_new();
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
eina_strbuf_append_vprintf(sb, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
if (!eina_log_color_disable_get())
|
||||
{
|
||||
fprintf(stderr, EINA_COLOR_RED "eolian" EINA_COLOR_RESET ": "
|
||||
EINA_COLOR_ORANGE "%s\n" EINA_COLOR_RESET,
|
||||
eina_strbuf_string_get(sb));
|
||||
EINA_COLOR_ORANGE "%s\n" EINA_COLOR_RESET, str);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "eolian: %s\n", eina_strbuf_string_get(sb));
|
||||
fprintf(stderr, "eolian: %s\n", str);
|
||||
}
|
||||
eina_strbuf_free(sb);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue