const char* arch, FILE* conf, int flags, pakfire_log_callback log_callback, void* log_data) {
char tempdir[PATH_MAX] = PAKFIRE_TMP_DIR "/pakfire-root-XXXXXX";
char private_dir[PATH_MAX];
+ const char* env = NULL;
int r = 1;
// Reset pakfire pointer
pakfire_log_set_priority(p, LOG_DEBUG);
// Otherwise take the log level from the environment
+ } else if ((env = secure_getenv("PAKFIRE_LOG"))) {
+ pakfire_log_set_priority(p, log_priority(env));
+
+ // Otherwise set the log level to INFO
} else {
- const char* env = secure_getenv("PAKFIRE_LOG");
- if (env)
- pakfire_log_set_priority(p, log_priority(env));
+ pakfire_log_set_priority(p, LOG_INFO);
}
// Store the nominal architecture