[xiph-cvs] cvs commit: ices/src cfgparse.c cfgparse.h ices.c
Karl Heyes
karl at xiph.org
Thu Mar 11 09:16:08 PST 2004
karl 04/03/11 12:16:08
Modified: src cfgparse.c cfgparse.h ices.c
Log:
allow for different log file size, default is 2Meg
Revision Changes Path
1.10 +5 -1 ices/src/cfgparse.c
Index: cfgparse.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/cfgparse.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- a/cfgparse.c 22 Dec 2003 14:01:09 -0000 1.9
+++ b/cfgparse.c 11 Mar 2004 17:16:08 -0000 1.10
@@ -1,7 +1,7 @@
/* cfgparse.c
* - cfgparse file reading code, plus default settings.
*
- * $Id: cfgparse.c,v 1.9 2003/12/22 14:01:09 karl Exp $
+ * $Id: cfgparse.c,v 1.10 2004/03/11 17:16:08 karl Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -33,6 +33,7 @@
#define DEFAULT_LOGPATH "/tmp"
#define DEFAULT_LOGFILE "ices.log"
#define DEFAULT_LOGLEVEL 1
+#define DEFAULT_LOGSIZE 2048
#define DEFAULT_LOG_STDERR 1
#define DEFAULT_STREAM_NAME "unnamed ices stream"
#define DEFAULT_STREAM_GENRE "ices unset"
@@ -344,6 +345,8 @@
SET_STRING(config->logfile);
else if (strcmp(node->name, "loglevel") == 0)
SET_INT(config->loglevel);
+ else if (strcmp(node->name, "logsize") == 0)
+ SET_INT(config->logsize);
else if (strcmp(node->name, "consolelog") == 0)
SET_INT(config->log_stderr);
else if (strcmp(node->name, "pidfile") == 0)
@@ -360,6 +363,7 @@
c->background = DEFAULT_BACKGROUND;
c->logpath = strdup(DEFAULT_LOGPATH);
c->logfile = strdup(DEFAULT_LOGFILE);
+ c->logsize = DEFAULT_LOGSIZE;
c->loglevel = DEFAULT_LOGLEVEL;
c->log_stderr = DEFAULT_LOG_STDERR;
<p><p>1.7 +2 -1 ices/src/cfgparse.h
Index: cfgparse.h
===================================================================
RCS file: /usr/local/cvsroot/ices/src/cfgparse.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- a/cfgparse.h 22 Dec 2003 14:01:09 -0000 1.6
+++ b/cfgparse.h 11 Mar 2004 17:16:08 -0000 1.7
@@ -1,7 +1,7 @@
/* config.h
* - configuration, and global structures built from config
*
- * $Id: cfgparse.h,v 1.6 2003/12/22 14:01:09 karl Exp $
+ * $Id: cfgparse.h,v 1.7 2004/03/11 17:16:08 karl Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -76,6 +76,7 @@
int background;
char *logpath;
char *logfile;
+ unsigned logsize;
char *pidfile;
int loglevel;
int log_stderr;
<p><p>1.19 +2 -2 ices/src/ices.c
Index: ices.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/ices.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- a/ices.c 1 Mar 2004 23:39:38 -0000 1.18
+++ b/ices.c 11 Mar 2004 17:16:08 -0000 1.19
@@ -1,7 +1,7 @@
/* ices.c
* - Main startup, thread launching, and cleanup code.
*
- * $Id: ices.c,v 1.18 2004/03/01 23:39:38 karl Exp $
+ * $Id: ices.c,v 1.19 2004/03/11 17:16:08 karl Exp $
*
* Copyright (c) 2001-2002 Michael Smith <msmith at labyrinth.net.au>
*
@@ -94,7 +94,7 @@
log = log_open(logpath);
if (log < 0)
fprintf (stderr, "unable to open log %s\n", logpath);
- log_set_trigger (log, 2048);
+ log_set_trigger (log, ices_config->logsize);
}
/* Set the log level, if requested - defaults to 2 (WARN) otherwise */
if (ices_config->loglevel)
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list