Skip to contentSkip to conversation

log: remove app path from syslog id

PATCH In review Thomas Monjalon 2 participants 3 messages Sep 30, 2013 – Oct 9, 2013 4 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 log: remove app path from syslog id

This reverts commit "log: get full path as syslog id" (494a02537f1) and restore the original patch from Stephen Hemminger (04210699eee).

---
 lib/librte_eal/linuxapp/eal/eal.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/librte_eal/linuxapp/eal/eal.c +5 -1
index 6086ca4..aa86b9c 100644
@@ -829,10 +829,14 @@ rte_eal_init(int argc, char **argv)
 	pthread_t thread_id;
 	static rte_atomic32_t run_once = RTE_ATOMIC32_INIT(0);
 	struct shared_driver *solib = NULL;
+	const char *logid;
 
 	if (!rte_atomic32_test_and_set(&run_once))
 		return -1;
 
+	logid = strrchr(argv[0], '/');
+	logid = strdup(logid ? logid + 1: argv[0]);
+
 	thread_id = pthread_self();
 
 	if (rte_eal_log_early_init() < 0)
@@ -884,7 +888,7 @@ rte_eal_init(int argc, char **argv)
 	if (rte_eal_tailqs_init() < 0)
 		rte_panic("Cannot init tail queues for objects\n");
 
-	if (rte_eal_log_init(argv[0], internal_config.syslog_facility) < 0)
+	if (rte_eal_log_init(logid, internal_config.syslog_facility) < 0)
 		rte_panic("Cannot init logs\n");
 
 	if (rte_eal_alarm_init() < 0)
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 20130930114056.14e72f25-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org

#4 lore raw
Quoted 15 lines · On Mon, 30 Sep 2013 11:40:56 -0700 Stephen Hemminger…
Quoted 10 lines · On Mon, 30 Sep 2013 10:57:16 +0200 Thomas Monjalon…

Hi Stephen,

30/09/2013 10:43, Thomas Monjalon :

Quoted 2 lines

This reverts commit "log: get full path as syslog id" (494a02537f1) and restore the original patch from Stephen Hemminger (04210699eee).

Is this patch OK for you ?
Would you like to ack it ?

Thanks

A message that is not in the archive (sent off-list or not yet received): 20130930144946.703437c2-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org

#6 lore raw

30/09/2013 14:49, Stephen Hemminger :

Quoted 5 lines

30/09/2013 10:43, Thomas Monjalon :

Quoted 2 lines

This reverts commit "log: get full path as syslog id" (494a02537f1) and restore the original patch from Stephen Hemminger (04210699eee).

I have forgotten this commit in release 1.5.0r1.

It is now pushed to 1.4.1 and 1.5.0 branches.

Signature · 1 line
Thomas