Removed logging since it takes up lots of space

This commit is contained in:
Patrick McDonagh
2016-03-31 14:57:57 -05:00
parent 0b09a84ad0
commit c202feb2f7
2 changed files with 8 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ from datetime import datetime
import time
import sqlite3 as lite
from pycomm.ab_comm.clx import Driver as ClxDriver
import logging
# import logging
import traceback
con = lite.connect("/mnt/usb/data.db")
@@ -31,11 +31,11 @@ def readConfig():
def readTag(addr, tag):
logging.basicConfig(
filename="clx.log",
format="%(levelname)-10s %(asctime)s %(message)s",
level=logging.DEBUG
)
# logging.basicConfig(
# filename="clx.log",
# format="%(levelname)-10s %(asctime)s %(message)s",
# level=logging.DEBUG
# )
c = ClxDriver()
if c.open(addr):
try:
@@ -52,7 +52,7 @@ def readTag(addr, tag):
def readArray(addr, arr, length):
logging.basicConfig(filename="clx.log", format="%(levelname)-10s %(asctime)s %(message)s", level=logging.DEBUG)
# logging.basicConfig(filename="clx.log", format="%(levelname)-10s %(asctime)s %(message)s", level=logging.DEBUG)
c = ClxDriver()
if c.open(addr):
try:

View File

@@ -93,7 +93,7 @@ def writeTagAndVerify(tag,value, sleepValue=2):
value = int(value)
elif tagType == "REAL":
value = float(value)
c = ClxDriver(True, 'ClxDriver.log')
c = ClxDriver()
if c.open(PLC_IP_ADDRESS):
r = c.write_tag(tag, value, tagType)
sleep(float(sleepValue))