From 40bc8fd18ff0636dac1a20f08129d61383a46cc3 Mon Sep 17 00:00:00 2001 From: krw Date: Fri, 23 May 2014 17:36:59 +0000 Subject: [PATCH] Make DEBUG a bit easier to use by calling setlogmask(LOG_UPTO(LOG_DEBUG)) when it is set, and the current setlogmask(LOG_UPTO(LOG_INFO)) when it is not set. --- sbin/dhclient/dhclient.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 8a04253e5b2..48ed8e59c82 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.310 2014/05/23 15:26:22 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.311 2014/05/23 17:36:59 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -402,7 +402,11 @@ main(int argc, char *argv[]) /* Initially, log errors to stderr as well as to syslogd. */ openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON); +#ifdef DEBUG + setlogmask(LOG_UPTO(LOG_DEBUG)); +#else setlogmask(LOG_UPTO(LOG_INFO)); +#endif while ((ch = getopt(argc, argv, "c:di:l:L:qu")) != -1) switch (ch) { -- 2.20.1