summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2014-05-23 17:37:00 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2014-05-23 17:37:00 +0000
commit7630d750218367960927ae3f9a5385ccaaaf6842 (patch)
treed6174eae741f9ef5f0103790c9a6fd36f620461e /sbin
parent0a05d277949f7404fb98af567559474053662bb5 (diff)
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.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient.c6
1 files changed, 5 insertions, 1 deletions
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 <henning@openbsd.org>
@@ -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) {