Skip to content

Commit

Permalink
Enable error logging when in DEBUG mode
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Dec 28, 2024
1 parent 58b41f4 commit 1a35597
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions c_src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ int utils_init(ErlNifEnv *env, const char *log_level) {
} else if (strcmp(log_level, "error") == 0) {
VIX_LOG_LEVEL = VIX_LOG_LEVEL_ERROR;
} else {
#ifdef DEBUG
// default to ERROR if we are running in debug mode
VIX_LOG_LEVEL = VIX_LOG_LEVEL_ERROR;
#else
VIX_LOG_LEVEL = VIX_LOG_LEVEL_NONE;
#endif
}

if (VIX_LOG_LEVEL == VIX_LOG_LEVEL_WARNING ||
Expand Down

0 comments on commit 1a35597

Please sign in to comment.