telemetry: fix error log output

Message ID 20200511150931.1693-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series telemetry: fix error log output |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/travis-robot warning Travis build: failed
ci/Intel-compilation fail apply issues

Commit Message

David Marchand May 11, 2020, 3:09 p.m. UTC
  Caught while running testpmd:
No telemetry legacy support- No legacy callbacks, legacy socket not createdInteractive-mode selected

Add missing \n.

Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_telemetry/telemetry.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Bruce Richardson May 11, 2020, 4:38 p.m. UTC | #1
On Mon, May 11, 2020 at 05:09:31PM +0200, David Marchand wrote:
> Caught while running testpmd:
> No telemetry legacy support- No legacy callbacks, legacy socket not createdInteractive-mode selected
> 
> Add missing \n.
> 
> Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality")
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
David Marchand May 11, 2020, 4:59 p.m. UTC | #2
On Mon, May 11, 2020 at 6:38 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Mon, May 11, 2020 at 05:09:31PM +0200, David Marchand wrote:
> > Caught while running testpmd:
> > No telemetry legacy support- No legacy callbacks, legacy socket not createdInteractive-mode selected
> >
> > Add missing \n.
> >
> > Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality")
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>

Applied, thanks.
  

Patch

diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
index 9a1e945455..56a2fed3f5 100644
--- a/lib/librte_telemetry/telemetry.c
+++ b/lib/librte_telemetry/telemetry.c
@@ -275,8 +275,8 @@  socket_listener(void *socket)
 		int s_accepted = accept(s->sock, NULL, NULL);
 		if (s_accepted < 0) {
 			snprintf(telemetry_log_error,
-					sizeof(telemetry_log_error),
-					"Error with accept, telemetry thread quitting\n");
+				sizeof(telemetry_log_error),
+				"Error with accept, telemetry thread quitting");
 			return NULL;
 		}
 		pthread_create(&th, NULL, s->fn, (void *)(uintptr_t)s_accepted);
@@ -400,12 +400,12 @@  rte_telemetry_init(const char *runtime_dir, const char **err_str)
 {
 	if (telemetry_v2_init(runtime_dir) != 0) {
 		*err_str = telemetry_log_error;
-		printf("Error initialising telemetry - %s", *err_str);
+		printf("Error initialising telemetry - %s\n", *err_str);
 		return -1;
 	}
 	if (telemetry_legacy_init(runtime_dir) != 0) {
 		*err_str = telemetry_log_error;
-		printf("No telemetry legacy support- %s", *err_str);
+		printf("No telemetry legacy support - %s\n", *err_str);
 	}
 	return 0;
 }