color logging

This commit is contained in:
Devaev Maxim
2019-09-06 22:26:15 +03:00
parent 2dbaf08eb0
commit 93d5be6ffc
5 changed files with 64 additions and 40 deletions

View File

@@ -22,23 +22,15 @@
#pragma once
#include <stdio.h>
#include <sys/syscall.h>
#include <IL/OMX_IVCommon.h>
#include <IL/OMX_Core.h>
#include <IL/OMX_Image.h>
#include "../../logging.h"
#include "../../tools.h"
#define LOG_OMX_ERROR(_error, _msg, ...) { \
LOGGING_LOCK; \
printf("-- ERROR [%.03Lf tid=%ld] -- " _msg ": %s\n", get_now_monotonic(), \
syscall(SYS_gettid), ##__VA_ARGS__, omx_error_to_string(_error)); \
LOGGING_UNLOCK; \
LOG_ERROR(_msg ": %s", ##__VA_ARGS__, omx_error_to_string(_error)); \
}