Add print for log debug

This commit is contained in:
Luc VOISE 2020-10-16 17:20:09 +02:00
parent 7e02c0ad78
commit 34c71dce65

View file

@ -138,17 +138,18 @@ def main():
print("Manual server choice : ID = " + SERVER_ID)
if speedtest.returncode == 0: # Speedtest was successful.
data = format_for_influx(speedtest.stdout)
print("Speedtest Successful:")
print("Speedtest Successful :")
print(speedtest.stdout)
if influxdb_client.write_points(data) == True:
print("Data written to DB successfully")
time.sleep(TEST_INTERVAL)
else: # Speedtest failed.
print("Speedtest Failed:")
print("Speedtest Failed :")
print(speedtest.stderr)
print(speedtest.stdout)
time.sleep(TEST_FAIL_INTERVAL)
if __name__ == '__main__':
print('Speedtest CLI Data Logger to InfluxDB')
print('Speedtest CLI data logger to InfluxDB started...')
main()