|
@@ -1,5 +1,6 @@
|
|
|
#!/usr/bin/env python3
|
|
|
# -*- coding: utf-8 -*-
|
|
|
+import logging
|
|
|
import os
|
|
|
import hashlib
|
|
|
import json
|
|
@@ -122,6 +123,8 @@ class IotCoreView(View):
|
|
|
# ip = CommonService.get_ip_address(request)
|
|
|
ip = CommonService.get_ip_address(request)
|
|
|
region_id = Device_Region().get_device_region(ip)
|
|
|
+ logger = logging.getLogger('info')
|
|
|
+ logger.info('---设备注册到IoT Core接口--- ip:{},region_id:{}'.format(ip, region_id))
|
|
|
|
|
|
iotClient = IOTClient(region_id)
|
|
|
res = iotClient.register_to_iot_core(ThingNameSuffix, thingGroup, response)
|