starter: Added --nolog option to suppress logging in starter itself
Fixes #224.
This commit is contained in:
@@ -327,8 +327,8 @@ static bool check_pid(char *pid_file)
|
|||||||
|
|
||||||
static void usage(char *name)
|
static void usage(char *name)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Usage: starter [--nofork] [--auto-update <sec>] "
|
fprintf(stderr, "Usage: starter [--nofork] [--auto-update <sec>]\n"
|
||||||
"[--debug|--debug-more|--debug-all]\n");
|
" [--debug|--debug-more|--debug-all|--nolog]\n");
|
||||||
exit(LSB_RC_INVALID_ARGUMENT);
|
exit(LSB_RC_INVALID_ARGUMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,6 +372,10 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
current_loglevel = 4;
|
current_loglevel = 4;
|
||||||
}
|
}
|
||||||
|
else if (streq(argv[i], "--nolog"))
|
||||||
|
{
|
||||||
|
current_loglevel = 0;
|
||||||
|
}
|
||||||
else if (streq(argv[i], "--nofork"))
|
else if (streq(argv[i], "--nofork"))
|
||||||
{
|
{
|
||||||
no_fork = TRUE;
|
no_fork = TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user