daemon: Add `--debug' option.
* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_DEBUG): New macro. (options): Add `--debug'. (parse_opt): Set `verbosity' upon GUIX_OPT_DEBUG.
This commit is contained in:
parent
335dd762cc
commit
da30f55582
|
@ -21,6 +21,7 @@
|
||||||
#include <types.hh>
|
#include <types.hh>
|
||||||
#include "shared.hh"
|
#include "shared.hh"
|
||||||
#include <globals.hh>
|
#include <globals.hh>
|
||||||
|
#include <util.hh>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <argp.h>
|
#include <argp.h>
|
||||||
|
@ -56,6 +57,7 @@ builds derivations on behalf of its clients.";
|
||||||
#define GUIX_OPT_DISABLE_LOG_COMPRESSION 6
|
#define GUIX_OPT_DISABLE_LOG_COMPRESSION 6
|
||||||
#define GUIX_OPT_DISABLE_STORE_OPTIMIZATION 7
|
#define GUIX_OPT_DISABLE_STORE_OPTIMIZATION 7
|
||||||
#define GUIX_OPT_IMPERSONATE_LINUX_26 8
|
#define GUIX_OPT_IMPERSONATE_LINUX_26 8
|
||||||
|
#define GUIX_OPT_DEBUG 9
|
||||||
|
|
||||||
static const struct argp_option options[] =
|
static const struct argp_option options[] =
|
||||||
{
|
{
|
||||||
|
@ -88,6 +90,8 @@ static const struct argp_option options[] =
|
||||||
" (this option has no effect in this configuration)"
|
" (this option has no effect in this configuration)"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
|
{ "debug", GUIX_OPT_DEBUG, 0, 0,
|
||||||
|
"Produce debugging output" },
|
||||||
{ 0, 0, 0, 0, 0 }
|
{ 0, 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,6 +122,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
|
||||||
case GUIX_OPT_LOSE_LOGS:
|
case GUIX_OPT_LOSE_LOGS:
|
||||||
settings.keepLog = false;
|
settings.keepLog = false;
|
||||||
break;
|
break;
|
||||||
|
case GUIX_OPT_DEBUG:
|
||||||
|
verbosity = lvlDebug;
|
||||||
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
settings.buildCores = atoi (arg);
|
settings.buildCores = atoi (arg);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue