The create command was printing new messages with the changes made from
2.0 to 2.1 which is considered to be an API breakage.
This patch puts back the message output of 2.0 for the lttng create
command.
Reported-by: <bernd.hufmann@ericsson.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
int ret;
char *session_name = NULL, *traces_path = NULL, *alloc_path = NULL;
char *alloc_url = NULL, *url = NULL, datetime[16];
int ret;
char *session_name = NULL, *traces_path = NULL, *alloc_path = NULL;
char *alloc_url = NULL, *url = NULL, datetime[16];
- char session_name_date[NAME_MAX];
+ char session_name_date[NAME_MAX], *print_str_url = NULL;
time_t rawtime;
struct tm *timeinfo;
time_t rawtime;
struct tm *timeinfo;
if (opt_no_consumer) {
url = NULL;
if (opt_no_consumer) {
url = NULL;
} else if (opt_output_path != NULL) {
traces_path = utils_expand_path(opt_output_path);
if (traces_path == NULL) {
} else if (opt_output_path != NULL) {
traces_path = utils_expand_path(opt_output_path);
if (traces_path == NULL) {
}
/* URL to use in the lttng_create_session() call */
url = alloc_url;
}
/* URL to use in the lttng_create_session() call */
url = alloc_url;
- MSG("Trace(s) output set to %s", traces_path);
+ print_str_url = traces_path;
} else if (opt_url) { /* Handling URL (-U opt) */
url = opt_url;
} else if (opt_url) { /* Handling URL (-U opt) */
url = opt_url;
- MSG("Trace(s) output set to %s", url);
} else if (opt_ctrl_url == NULL && opt_data_url == NULL) {
/* Auto output path */
alloc_path = config_get_default_path();
} else if (opt_ctrl_url == NULL && opt_data_url == NULL) {
/* Auto output path */
alloc_path = config_get_default_path();
- MSG("Trace(s) output set to %s", alloc_url + strlen("file://"));
+ print_str_url = alloc_url + strlen("file://");
}
ret = _lttng_create_session_ext(session_name, url, datetime);
}
ret = _lttng_create_session_ext(session_name, url, datetime);
}
if (opt_session_name == NULL) {
}
if (opt_session_name == NULL) {
- MSG("Session created with default name %s", session_name_date);
+ MSG("Session %s created.", session_name_date);
} else {
MSG("Session %s created.", session_name);
}
} else {
MSG("Session %s created.", session_name);
}
+ MSG("Traces will be written in %s", print_str_url);
if (opt_ctrl_url || opt_data_url) {
/* Setting up control URI (-C or/and -D opt) */
if (opt_ctrl_url || opt_data_url) {
/* Setting up control URI (-C or/and -D opt) */