chen.wang1 | 9fec184 | 2023-06-15 06:52:30 +0000 | [diff] [blame] | 1 | #ifndef LIBDRM_MESON_LOG_H_ |
| 2 | #define LIBDRM_MESON_LOG_H_ |
| 3 | #if defined(__cplusplus) |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
| 7 | #include <stdio.h> |
| 8 | #include <stdint.h> |
| 9 | #include <stdlib.h> |
| 10 | #include <unistd.h> |
| 11 | |
| 12 | void mesonDrmLog( int level, const char *fmt, ... ); |
chen.wang1 | e6ac8df | 2023-09-12 06:07:18 +0000 | [diff] [blame^] | 13 | void mesonDrmEdidLog( int level, const char *fmt, ... ); |
chen.wang1 | 9fec184 | 2023-06-15 06:52:30 +0000 | [diff] [blame] | 14 | long long getMonotonicTimeMicros( void ); |
| 15 | |
chen.wang1 | e6ac8df | 2023-09-12 06:07:18 +0000 | [diff] [blame^] | 16 | #define INT_ERROR(FORMAT, ...) mesonDrmLog(0, "ERROR: " FORMAT "\n", __VA_ARGS__) |
| 17 | #define INT_INFO(FORMAT, ...) mesonDrmLog(1, "INFO: " FORMAT "\n", __VA_ARGS__) |
| 18 | #define INT_DEBUG(FORMAT, ...) mesonDrmLog(2, "DEBUG: " FORMAT "\n", __VA_ARGS__) |
| 19 | #define INT_DEBUG_DEID(FORMAT, ...) mesonDrmEdidLog(2, FORMAT , __VA_ARGS__) |
chen.wang1 | 9fec184 | 2023-06-15 06:52:30 +0000 | [diff] [blame] | 20 | |
| 21 | #define ERROR(...) INT_ERROR(__VA_ARGS__, "") |
| 22 | #define INFO(...) INT_INFO(__VA_ARGS__, "") |
| 23 | #define DEBUG(...) INT_DEBUG(__VA_ARGS__, "") |
chen.wang1 | e6ac8df | 2023-09-12 06:07:18 +0000 | [diff] [blame^] | 24 | #define DEBUG_EDID(...) INT_DEBUG_DEID(__VA_ARGS__, "") |
chen.wang1 | 9fec184 | 2023-06-15 06:52:30 +0000 | [diff] [blame] | 25 | |
| 26 | #if defined(__cplusplus) |
| 27 | } |
| 28 | #endif |
| 29 | |
| 30 | #endif |