Files
hongquan.li 872b8a3d5d add license
2023-09-08 19:09:15 +08:00

25 lines
808 B
C

/*
* Copyright (c) 2023-2023, lihongquan
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2023-9-8 lihongquan add license declaration
*/
#pragma once
#include <cstdio>
#define LOG_COLOR_RED "\x1b[31m"
#define LOG_COLOR_GREEN "\x1b[32m"
#define LOG_COLOR_YELLOW "\x1b[33m"
#define LOG_COLOR_BLUE "\x1b[34m"
#define LOG_COLOR_MAGENTA "\x1b[35m"
#define LOG_COLOR_CYAN "\x1b[36m"
#define LOG_COLOR_RESET "\x1b[0m"
#define LOG_INFO(format, ...) printf(LOG_COLOR_GREEN "I %s: " format LOG_COLOR_RESET "\n", TAG, ##__VA_ARGS__)
#define LOG_WARN(format, ...) printf(LOG_COLOR_YELLOW "W %s: " format LOG_COLOR_RESET "\n", TAG, ##__VA_ARGS__)
#define LOG_ERROR(format, ...) printf(LOG_COLOR_RED "E %s: " format LOG_COLOR_RESET "\n", TAG, ##__VA_ARGS__)