lttng: Indicate file path and error reason when open_config fails
[lttng-tools.git] / src / bin / lttng / conf.cpp
index 65be35a158f70518dda1317f78900347ba67b117..81aa654384c97bbccf0360be39d91a2e7326f230 100644 (file)
@@ -54,6 +54,7 @@ static FILE *open_config(const char *path, const char *mode)
 
        fp = fopen(file_path, mode);
        if (fp == nullptr) {
+               PWARN("Failed to open configuration file '%s'", file_path);
                goto error;
        }
 
@@ -74,7 +75,6 @@ static int create_config_file(const char *path)
 
        fp = open_config(path, "w+");
        if (fp == nullptr) {
-               ERR("Unable to create config file");
                ret = -1;
                goto error;
        }
This page took 0.025 seconds and 4 git commands to generate.