fix: use warn log level for release builds
DEBUG builds use INFO level, release builds use WARNING level
- SHA
8afe017f78135106aa33e93aaea4c8c72002bc66- Parents
-
799ab87 - Tree
7d2f902
8afe017
8afe017f78135106aa33e93aaea4c8c72002bc66799ab87
7d2f902| Status | File | + | - |
|---|---|---|---|
| M |
src/main.c
|
5 | 1 |
src/main.cmodified@@ -109,8 +109,12 @@ int main(int argc, char *argv[]) { | ||
| 109 | 109 | {0, 0, 0, 0} |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | - /* Initialize error handling */ | |
| 112 | + /* Initialize error handling - use WARN level for release builds, INFO for debug */ | |
| 113 | +#ifdef DEBUG | |
| 113 | 114 | if (error_init(LOG_LEVEL_INFO, NULL) != 0) { |
| 115 | +#else | |
| 116 | + if (error_init(LOG_LEVEL_WARNING, NULL) != 0) { | |
| 117 | +#endif | |
| 114 | 118 | fprintf(stderr, "Failed to initialize error handling\n"); |
| 115 | 119 | return EXIT_FAILURE; |
| 116 | 120 | } |