Revision: 14298 Author: adrian.chadd Date: Mon Sep 14 18:29:31 2009 Log: Obey the SQUID_DEBUG environment variable for setting the default debug level.
http://code.google.com/p/lusca-cache/source/detail?r=14298 Modified: /branches/LUSCA_HEAD/app/ufs_rebuild/ufs_rebuild.c ======================================= --- /branches/LUSCA_HEAD/app/ufs_rebuild/ufs_rebuild.c Wed Jul 22 07:37:20 2009 +++ /branches/LUSCA_HEAD/app/ufs_rebuild/ufs_rebuild.c Mon Sep 14 18:29:31 2009 @@ -5,6 +5,7 @@ #include "include/config.h" #include "include/squid_md5.h" +#include "include/util.h" #include "libcore/varargs.h" #include "libcore/kb.h" @@ -48,7 +49,9 @@ const char *cmd; store_ufs_dir_t store_ufs_info; rebuild_type_t rebuild_type; + char *t; char *wbuf = NULL; + char *debug_args = "ALL,1"; if (argc < 5) { usage(argv[0]); @@ -62,10 +65,11 @@ } /* Setup the debugging library */ - _db_init("ALL,1"); + if ((t = getenv("SQUID_DEBUG"))) + debug_args = xstrdup(t); + _db_init(debug_args); _db_set_stderr_debug(1); - store_ufs_init(&store_ufs_info, argv[2], atoi(argv[3]), atoi(argv[4]), argv[5]); if (strcmp(cmd, "rebuild-dir") == 0) { --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "lusca-commit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/lusca-commit?hl=en -~----------~----~----~----~------~----~------~--~---
