diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-02-18 21:49:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-18 21:49:23 -0500 |
commit | 868ad5af69583646ba71d6e73e362818c7416941 (patch) | |
tree | 723b27e9b1fd24e85d9c44203f19364720510827 /util/log.c | |
parent | 566c98846a92300d29e9fb4b408fd7e51898d42c (diff) | |
parent | 86269052eb7be715eba274dffc30c77c11b8309c (diff) |
Merge pull request #647 from ascent12/elf_visibility
ELF Visibility
Diffstat (limited to 'util/log.c')
-rw-r--r-- | util/log.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7,6 +7,7 @@ #include <time.h> #include <unistd.h> #include <wlr/util/log.h> +#include "util/defs.h" static bool colored = true; static log_importance_t log_importance = L_ERROR; @@ -48,6 +49,7 @@ void wlr_log_stderr(log_importance_t verbosity, const char *fmt, va_list args) { static log_callback_t log_callback = wlr_log_stderr; +WLR_API void wlr_log_init(log_importance_t verbosity, log_callback_t callback) { if (verbosity < L_LAST) { log_importance = verbosity; @@ -57,10 +59,12 @@ void wlr_log_init(log_importance_t verbosity, log_callback_t callback) { } } +WLR_API void _wlr_vlog(log_importance_t verbosity, const char *fmt, va_list args) { log_callback(verbosity, fmt, args); } +WLR_API void _wlr_log(log_importance_t verbosity, const char *fmt, ...) { va_list args; va_start(args, fmt); @@ -73,6 +77,7 @@ void _wlr_log(log_importance_t verbosity, const char *fmt, ...) { // e.g. '/src/build/wlroots/backend/wayland/backend.c' and // '../backend/wayland/backend.c' will both be stripped to // 'backend/wayland/backend.c' +WLR_API const char *_strip_path(const char *filepath) { static int srclen = sizeof(WLR_SRC_DIR); if (strstr(filepath, WLR_SRC_DIR) == filepath) { |