Skip to content

Commit 1362b6d

Browse files
authored
Rename log_level enums (#252)
* rename loglevel enums * Update bh_log.c
1 parent 7abd1ca commit 1362b6d

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

core/shared/utils/bh_log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* The verbose level of the log system. Only those verbose logs whose
1010
* levels are less than or equal to this value are outputed.
1111
*/
12-
static uint32 log_verbose_level = LOG_LEVEL_WARNING;
12+
static uint32 log_verbose_level = BH_LOG_LEVEL_WARNING;
1313

1414
void
1515
bh_log_set_verbose_level(uint32 level)

core/shared/utils/bh_log.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ extern "C" {
2828
#endif
2929

3030
typedef enum {
31-
LOG_LEVEL_FATAL = 0,
32-
LOG_LEVEL_ERROR = 1,
33-
LOG_LEVEL_WARNING = 2,
34-
LOG_LEVEL_DEBUG = 3,
35-
LOG_LEVEL_VERBOSE = 4
31+
BH_LOG_LEVEL_FATAL = 0,
32+
BH_LOG_LEVEL_ERROR = 1,
33+
BH_LOG_LEVEL_WARNING = 2,
34+
BH_LOG_LEVEL_DEBUG = 3,
35+
BH_LOG_LEVEL_VERBOSE = 4
3636
} LogLevel;
3737

3838
void
@@ -41,11 +41,11 @@ bh_log_set_verbose_level(uint32 level);
4141
void
4242
bh_log(LogLevel log_level, const char *file, int line, const char *fmt, ...);
4343

44-
#define LOG_FATAL(...) bh_log(LOG_LEVEL_FATAL, __FILE__, __LINE__, __VA_ARGS__)
45-
#define LOG_ERROR(...) bh_log(LOG_LEVEL_ERROR, NULL, 0, __VA_ARGS__)
46-
#define LOG_DEBUG(...) bh_log(LOG_LEVEL_DEBUG, __FILE__, __LINE__, 0, __VA_ARGS__)
47-
#define LOG_WARNING(...) bh_log(LOG_LEVEL_WARNING, NULL, 0, __VA_ARGS__)
48-
#define LOG_VERBOSE(...) bh_log(LOG_LEVEL_VERBOSE, NULL, 0, __VA_ARGS__)
44+
#define LOG_FATAL(...) bh_log(BH_LOG_LEVEL_FATAL, __FILE__, __LINE__, __VA_ARGS__)
45+
#define LOG_ERROR(...) bh_log(BH_LOG_LEVEL_ERROR, NULL, 0, __VA_ARGS__)
46+
#define LOG_DEBUG(...) bh_log(BH_LOG_LEVEL_DEBUG, __FILE__, __LINE__, 0, __VA_ARGS__)
47+
#define LOG_WARNING(...) bh_log(BH_LOG_LEVEL_WARNING, NULL, 0, __VA_ARGS__)
48+
#define LOG_VERBOSE(...) bh_log(BH_LOG_LEVEL_VERBOSE, NULL, 0, __VA_ARGS__)
4949

5050
void
5151
bh_print_time(const char *prompt);

0 commit comments

Comments
 (0)