added more logging info

This commit is contained in:
Pranav Jerry 2021-09-04 14:24:53 +05:30
parent e4a7fa5d3f
commit 87c5d48144
Signed by: pranav
GPG Key ID: F1DCDC4FED0A0C5B
3 changed files with 10 additions and 1 deletions

View File

@ -36,4 +36,4 @@ See README.md for documentation.
#
# In case you forgot to change the version, skip the number
# and put the next number in the next commit.
__version__ = "0.3.0a1.dev3"
__version__ = "0.3.0a1.dev4"

View File

@ -270,11 +270,15 @@ class Device:
# Stop ap if already started
self.stop_ap()
logger.debug(
"Starting ap on %s with ssid %s and password %s", self.name, ssid, passwd
)
self._proxy.Start(ssid, passwd)
def stop_ap(self):
"""stop ap if an ap is started"""
if self.is_ap_started():
logger.debug("Stopping ap on %s", self.name)
self._proxy.Stop()
self.reload()
@ -305,10 +309,12 @@ class Adapter:
def power_on(self):
"""power on the adapter"""
self._proxy.Powered = True
logger.debug("Powered on adapter %s", self.name)
def power_off(self):
"""power off the adapter"""
self._proxy.Powered = False
logger.debug("Powered off adapter %s", self.name)
def supports_mode(self, mode: str) -> bool:
"""

View File

@ -116,6 +116,9 @@ def setup_devices(args):
ap_adapter.reload()
ap_device.start_ap(args.ap_ssid, args.ap_passwd)
# naxalnet prints Bye if no errors occured
logger.info("Bye")
def print_wifi(args):
"""