This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-tsg-service-chaining-…/common/include/log.h

33 lines
859 B
C
Raw Normal View History

#ifndef _LOG_H
#define _LOG_H
#ifdef __cpluscplus
extern "C"
{
#endif
#include <stdio.h>
2023-02-03 18:52:56 +08:00
#define LOG_DEBUG(format, ...) \
{ \
fprintf(stdout, "DEBUG " format "\n", ##__VA_ARGS__); \
2023-02-03 18:52:56 +08:00
fflush(stdout); \
}
2023-02-03 18:52:56 +08:00
#define LOG_INFO(format, ...) \
{ \
fprintf(stdout, "INFO " format "\n", ##__VA_ARGS__); \
fflush(stdout); \
}
#define LOG_ERROR(format, ...) \
{ \
fprintf(stderr, "ERROR " format "\n", ##__VA_ARGS__); \
2023-02-03 18:52:56 +08:00
fflush(stderr); \
}
#ifdef __cpluscplus
}
#endif
#endif