c/main: Use u_logging.

Remove comp_compositor_print.
This commit is contained in:
Lubosz Sarnecki 2020-09-15 12:22:27 +02:00 committed by Jakob Bornecrantz
parent dc29c3f97e
commit bbeab1da3f
2 changed files with 11 additions and 46 deletions

View file

@ -790,22 +790,6 @@ compositor_init_vulkan(struct comp_compositor *c)
*
*/
void
comp_compositor_print(struct comp_compositor *c,
const char *func,
const char *fmt,
...)
{
fprintf(stderr, "%s - ", func);
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
fprintf(stderr, "\n");
}
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
static bool
_match_wl_entry(const char *wl_entry, VkDisplayPropertiesKHR *disp)

View file

@ -14,6 +14,7 @@
#include "util/u_threading.h"
#include "util/u_index_fifo.h"
#include "util/u_logging.h"
#include "vk/vk_image_allocator.h"
@ -297,28 +298,15 @@ comp_swapchain_import(struct xrt_compositor *xc,
void
comp_swapchain_really_destroy(struct comp_swapchain *sc);
/*!
* Printer helper.
*
* @public @memberof comp_compositor
*/
void
comp_compositor_print(struct comp_compositor *c,
const char *func,
const char *fmt,
...) XRT_PRINTF_FORMAT(3, 4);
/*!
* Spew level logging.
*
* @relates comp_compositor
*/
#define COMP_SPEW(c, ...) \
do { \
if (c->settings.print_spew) { \
comp_compositor_print(c, __func__, __VA_ARGS__); \
} \
} while (false)
if (c->settings.print_spew) { \
U_LOG_T(__VA_ARGS__); \
}
/*!
* Debug level logging.
@ -326,11 +314,9 @@ comp_compositor_print(struct comp_compositor *c,
* @relates comp_compositor
*/
#define COMP_DEBUG(c, ...) \
do { \
if (c->settings.print_debug) { \
comp_compositor_print(c, __func__, __VA_ARGS__); \
} \
} while (false)
if (c->settings.print_debug) { \
U_LOG_D(__VA_ARGS__); \
}
/*!
* Mode printing.
@ -338,21 +324,16 @@ comp_compositor_print(struct comp_compositor *c,
* @relates comp_compositor
*/
#define COMP_PRINT_MODE(c, ...) \
do { \
if (c->settings.print_modes) { \
comp_compositor_print(c, __func__, __VA_ARGS__); \
} \
} while (false)
if (c->settings.print_modes) { \
U_LOG_I(__VA_ARGS__); \
}
/*!
* Error level logging.
*
* @relates comp_compositor
*/
#define COMP_ERROR(c, ...) \
do { \
comp_compositor_print(c, __func__, __VA_ARGS__); \
} while (false)
#define COMP_ERROR(c, ...) U_LOG_E(__VA_ARGS__)
#ifdef __cplusplus