aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/wps-ap-nfc.py
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-11-30 14:49:04 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-27 20:08:13 (GMT)
commit6202500f6fb8d871b3cf3e6249cfc9f0e8c89316 (patch)
tree7f36a416f006c7d506852bb5beda298d1fc03d2d /hostapd/wps-ap-nfc.py
parent1f1b5b31d7d364cc0a4ba84d38ce75dba00da997 (diff)
downloadhostap-6202500f6fb8d871b3cf3e6249cfc9f0e8c89316.zip
hostap-6202500f6fb8d871b3cf3e6249cfc9f0e8c89316.tar.gz
hostap-6202500f6fb8d871b3cf3e6249cfc9f0e8c89316.tar.bz2
WPS NFC: Logging level configuration to wps-nfc.py and wps-ap-nfc.py
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd/wps-ap-nfc.py')
-rwxr-xr-xhostapd/wps-ap-nfc.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/hostapd/wps-ap-nfc.py b/hostapd/wps-ap-nfc.py
index 8fe7b9e..b9e233e 100755
--- a/hostapd/wps-ap-nfc.py
+++ b/hostapd/wps-ap-nfc.py
@@ -17,7 +17,6 @@ import nfc.llcp
import nfc.handover
import logging
-logging.basicConfig()
import wpaspy
@@ -214,6 +213,11 @@ def main():
clf = nfc.ContactlessFrontend()
parser = argparse.ArgumentParser(description='nfcpy to hostapd integration for WPS NFC operations')
+ parser.add_argument('-d', const=logging.DEBUG, default=logging.INFO,
+ action='store_const', dest='loglevel',
+ help='verbose debug output')
+ parser.add_argument('-q', const=logging.WARNING, action='store_const',
+ dest='loglevel', help='be quiet')
parser.add_argument('--only-one', '-1', action='store_true',
help='run only one operation and exit')
parser.add_argument('--no-wait', action='store_true',
@@ -229,6 +233,8 @@ def main():
global no_wait
no_wait = args.no_wait
+ logging.basicConfig(level=args.loglevel)
+
try:
if not clf.open("usb"):
print "Could not open connection with an NFC device"