/*
- * $Id: Debug.h,v 1.6 2003/07/16 05:27:17 robertc Exp $
+ * $Id: Debug.h,v 1.7 2003/08/31 21:20:08 robertc Exp $
*
* DEBUG: section 0 Debug Routines
* AUTHOR: Harvest Derived
static int level;
static std::ostream &getDebugOut();
static void finishDebug();
+ static void parseOptions(char const *);
private:
static std::ostringstream *CurrentDebug;
/*
- * $Id: SwapDir.cc,v 1.4 2003/07/22 15:23:01 robertc Exp $
+ * $Id: SwapDir.cc,v 1.5 2003/08/31 21:20:08 robertc Exp $
*
* DEBUG: section ?? Swap Dir base object
* AUTHOR: Robert Collins
if (value)
*value++ = '\0'; /* cut on = */
+ debugs(3,2, "SwapDir::parseOptions: parsing store option '" << name << "'='" << (value ? value : "") << "'");
+
if (newOption)
if (!newOption->parse(name, value, reconfiguring))
self_destruct();
/*
- * $Id: cache_cf.cc,v 1.448 2003/08/13 16:05:22 wessels Exp $
+ * $Id: cache_cf.cc,v 1.449 2003/08/31 21:20:08 robertc Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
#define free_onoff free_int
#define dump_eol dump_string
#define free_eol free_string
+#define dump_debug dump_string
+#define free_debug free_string
static void
dump_refreshpattern(StoreEntry * entry, const char *name, refresh_t * head)
*var = xstrdup((char *) token);
}
+void
+parse_debug(char *volatile *var)
+{
+ parse_eol(var);
+ safe_free(debug_options)
+ debug_options = xstrdup(Config.debugOptions);
+ Debug::parseOptions(Config.debugOptions);
+}
+
static void
dump_time_t(StoreEntry * entry, const char *name, time_t var)
{
#
-# $Id: cf.data.pre,v 1.340 2003/08/27 21:19:32 wessels Exp $
+# $Id: cf.data.pre,v 1.341 2003/08/31 21:20:08 robertc Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
NAME: debug_options
-TYPE: eol
+TYPE: debug
DEFAULT: ALL,1
LOC: Config.debugOptions
DOC_START
/*
- * $Id: debug.cc,v 1.95 2003/07/14 08:21:56 robertc Exp $
+ * $Id: debug.cc,v 1.96 2003/08/31 21:20:08 robertc Exp $
*
* DEBUG: section 0 Debug Routines
* AUTHOR: Harvest Derived
}
void
-_db_init(const char *logfile, const char *options) {
+Debug::parseOptions(char const *options) {
int i;
char *p = NULL;
char *s = NULL;
xfree(p);
}
+}
+
+void
+_db_init(const char *logfile, const char *options) {
+ Debug::parseOptions(options);
debugOpenLog(logfile);
/*
- * $Id: store_dir_coss.cc,v 1.49 2003/08/30 06:39:24 robertc Exp $
+ * $Id: store_dir_coss.cc,v 1.50 2003/08/31 21:20:10 robertc Exp $
*
* DEBUG: section 47 Store COSS Directory Routines
* AUTHOR: Eric Stern
typedef struct _RebuildState RebuildState;
-void storeCossDirParseBlkSize(SwapDir *, const char *, const char *, int);
-void storeCossDirDumpBlkSize(StoreEntry *, const char *, const SwapDir *);
-
struct _RebuildState
{
CossSwapDir *sd;
}
-CossSwapDir::CossSwapDir() : SwapDir ("coss"), fd (-1), swaplog_fd(-1), count(0), current_membuf (NULL), current_offset(0), numcollisions(0)
+CossSwapDir::CossSwapDir() : SwapDir ("coss"), fd (-1), swaplog_fd(-1), count(0), current_membuf (NULL), current_offset(0), numcollisions(0), blksz_bits(0)
{
membufs.head = NULL;
membufs.tail = NULL;
bool
CossSwapDir::optionBlockSizeParse(const char *option, const char *value, int reconfiguring)
{
+ assert(option);
+
+ if (strcmp(option, "block-size") != 0)
+ return false;
+
+ if (!value)
+ self_destruct();
+
int blksz = atoi(value);
if (blksz == (1 << blksz_bits))