diff options
-rw-r--r-- | test/test.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test.c b/test/test.c index fe6d90e..bd3100c 100644 --- a/test/test.c +++ b/test/test.c @@ -67,11 +67,12 @@ main(int argc, char **argv) { int max_identical = 0; int iterations = 1; char *tag = NULL; + char *msg_prefix = NULL; FILETIME current_time, max_time; unsigned long long max_time_64; int msg_index, total_sent; - while ((ch = getopt(argc, argv, "p:t:b:s:i:n:")) != -1) + while ((ch = getopt(argc, argv, "p:t:b:s:i:n:x:")) != -1) switch((char)ch) { case 'p': /* priority */ pri = pencode(optarg); @@ -91,6 +92,9 @@ main(int argc, char **argv) { case 'n': /* number of test iterations */ iterations = strtoul( optarg, NULL, 0 ); break; + case 'x': /* message prefix */ + msg_prefix = optarg; + break; case '?': default: usage(); @@ -113,7 +117,7 @@ main(int argc, char **argv) { for(;;) { int i; for( i = 0; i < 100; i++ ) { - syslog(pri, "test message %d", msg_index ); + syslog(pri, "%stest message %d", msg_prefix? msg_prefix : "", msg_index ); messages_sent++; total_sent++; if( identic_index < identic_count ) |