tenseleyflow/gitswitch / 8afe017

Browse files

fix: use warn log level for release builds

DEBUG builds use INFO level, release builds use WARNING level
Authored by espadonne
SHA
8afe017f78135106aa33e93aaea4c8c72002bc66
Parents
799ab87
Tree
7d2f902

1 changed file

StatusFile+-
M src/main.c 5 1
src/main.cmodified
@@ -109,8 +109,12 @@ int main(int argc, char *argv[]) {
109109
         {0, 0, 0, 0}
110110
     };
111111
     
112
-    /* Initialize error handling */
112
+    /* Initialize error handling - use WARN level for release builds, INFO for debug */
113
+#ifdef DEBUG
113114
     if (error_init(LOG_LEVEL_INFO, NULL) != 0) {
115
+#else
116
+    if (error_init(LOG_LEVEL_WARNING, NULL) != 0) {
117
+#endif
114118
         fprintf(stderr, "Failed to initialize error handling\n");
115119
         return EXIT_FAILURE;
116120
     }