GL CHOCO ENGINE
Loading...
Searching...
No Matches
choco_message.h
Go to the documentation of this file.
1
16#ifndef GLCE_ENGINE_BASE_CHOCO_MESSAGE_H
17#define GLCE_ENGINE_BASE_CHOCO_MESSAGE_H
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
28typedef enum {
34
40#define ENABLE_MESSAGE_SEVERITY_ERROR 1
41
47#define ENABLE_MESSAGE_SEVERITY_WARNING 1
48
49#ifdef RELEASE_BUILD
54 #define ENABLE_MESSAGE_SEVERITY_INFORMATION 0
55
60 #define ENABLE_MESSAGE_SEVERITY_DEBUG 0
61#else
66 #define ENABLE_MESSAGE_SEVERITY_INFORMATION 1
67
72 #define ENABLE_MESSAGE_SEVERITY_DEBUG 1
73#endif
74
82void message_output(message_severity_t severity_, const char* format_, ...);
83
84#if ENABLE_MESSAGE_SEVERITY_ERROR
89 #define ERROR_MESSAGE(...) message_output(MESSAGE_SEVERITY_ERROR, __VA_ARGS__)
90#else
95 #define ERROR_MESSAGE(...)
96#endif
97
98#if ENABLE_MESSAGE_SEVERITY_WARNING
103 #define WARN_MESSAGE(...) message_output(MESSAGE_SEVERITY_WARNING, __VA_ARGS__)
104#else
109 #define WARN_MESSAGE(...)
110#endif
111
112#if ENABLE_MESSAGE_SEVERITY_INFORMATION
117 #define INFO_MESSAGE(...) message_output(MESSAGE_SEVERITY_INFORMATION, __VA_ARGS__)
118#else
123 #define INFO_MESSAGE(...)
124#endif
125
126#if ENABLE_MESSAGE_SEVERITY_DEBUG
131 #define DEBUG_MESSAGE(...) message_output(MESSAGE_SEVERITY_DEBUG, __VA_ARGS__)
132#else
137 #define DEBUG_MESSAGE(...)
138#endif
139
140#ifdef __cplusplus
141}
142#endif
143#endif
void message_output(message_severity_t severity_, const char *format_,...)
メッセージ出力関数(メッセージの重要度に応じて出力フォーマットを変える)
Definition: choco_message.c:23
message_severity_t
出力メッセージ重要度リスト
Definition: choco_message.h:28
@ MESSAGE_SEVERITY_ERROR
Definition: choco_message.h:29
@ MESSAGE_SEVERITY_DEBUG
Definition: choco_message.h:32
@ MESSAGE_SEVERITY_INFORMATION
Definition: choco_message.h:31
@ MESSAGE_SEVERITY_WARNING
Definition: choco_message.h:30