projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d950c3e
)
Added option (-n) for tstlog to make call yaz_log a number of times
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 8 Sep 2005 13:22:58 +0000
(13:22 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 8 Sep 2005 13:22:58 +0000
(13:22 +0000)
test/tstlog.c
patch
|
blob
|
history
diff --git
a/test/tstlog.c
b/test/tstlog.c
index
8bce12f
..
f61070f
100644
(file)
--- a/
test/tstlog.c
+++ b/
test/tstlog.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: tstlog.c,v 1.5 2005-06-25 15:46:07 adam Exp $
+ * $Id: tstlog.c,v 1.6 2005-09-08 13:22:58 adam Exp $
*
*/
#include <stdio.h>
*
*/
#include <stdio.h>
@@
-13,13
+13,17
@@
int main(int argc, char **argv)
{
char *arg;
int main(int argc, char **argv)
{
char *arg;
- int ret;
+ int i, ret;
int level = YLOG_LOG;
int level = YLOG_LOG;
+ int number = 1;
- while ((ret = options("f:v:l:m:", argv, argc, &arg)) != -2)
+ while ((ret = options("f:v:l:m:n:s:", argv, argc, &arg)) != -2)
{
switch (ret)
{
{
switch (ret)
{
+ case 's':
+ yaz_log_init_max_size(atoi(arg));
+ break;
case 'f':
yaz_log_time_format(arg);
break;
case 'f':
yaz_log_time_format(arg);
break;
@@
-29,11
+33,15
@@
int main(int argc, char **argv)
case 'l':
yaz_log_init_file(arg);
break;
case 'l':
yaz_log_init_file(arg);
break;
+ case 'n':
+ number = atoi(arg);
+ break;
case 'm':
level = yaz_log_module_level(arg);
break;
case 0:
case 'm':
level = yaz_log_module_level(arg);
break;
case 0:
- yaz_log(level, "%s", arg);
+ for (i = 0; i<number; i++)
+ yaz_log(level, "%s", arg);
break;
default:
fprintf(stderr, "tstlog. Bad option\n");
break;
default:
fprintf(stderr, "tstlog. Bad option\n");