Skip to content

Commit

Permalink
add more helper channel enums
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCandianVendingMachine committed Sep 16, 2023
1 parent b3156c4 commit 4eabc5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ typedef enum LogLevel {
} LogLevel;

typedef enum LogChannel {
LOG_CHANNEL_NONE = 0,
LOG_CHANNEL_ALL = ~0,
LOG_CHANNEL_GENERIC = 1 << 0,
LOG_CHANNEL_CORE = 1 << 1,
LOG_CHANNEL_ENGINE = 1 << 2,
Expand Down
2 changes: 1 addition & 1 deletion src/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void log_level_to_channel(LogChannel channel, LogLevel level, const char* format
void logger_start(void) {
LOGGER = malloc(sizeof(Logger));
LOGGER->levels = DEBUG | INFO | WARN | ERROR;
LOGGER->suppressed_channels_stdout = 0;
LOGGER->suppressed_channels_stdout = LOG_CHANNEL_NONE;
log_info_to_channel(LOG_CHANNEL_CORE, "Logger Started");
}

Expand Down

0 comments on commit 4eabc5f

Please sign in to comment.