Logging

def post(Message, dataCall): import system, datetime now = datetime.datetime.now() timeStamp = str(now) nameDateFile = now.strftime("%Y%m%d") filename = "c://Users//AJ//%s.txt"%(nameDateFile) system.file.writeFile(filename, '\r\nIT\'S%s %s' %(timeStamp[0:23], str(Message)), 1) #tagPath = str(event.tagPath) #timestamp = newValue.timestamp #system.tag.getTagValue(dataCall) #currentTrack += " %s %s" % (timeStamp[0:23], str(Message)) #dataString.append([currentTrack]) #newdataset = system.dataset.toDataSet(["Current Track"], dataString) system.tag.writeToTag(dataCall, '%s %s' %(timeStamp[0:23], str(Message)))

Here is the function within my module.
I have tried to create and use datasets but have found that they cannot be used as string tags in labels or list boxes.
here is my gateway script:
import app
app.Winchester.Logger.post(‘lgyter2’, ‘dataString’)

Can I make a loop in order to create places to hold my strings for my logger display?
Can I manipulate a large string tag to split it up and organize it as if it were a python list or string?
I would like to do this without a database.
If a dataset is the way to go, can someone explain to me how to use them…I’m a bit unclear as to how they would be useful without using a database.

That’s where you’ve gone wrong. Doing this would be extremely simple using a database. Why won’t you or can’t you use the right tool for the job?

If you really can’t use a database, then you’re got to roll your sleeves up and do some more scripting. Maybe store the messages in a CSV file? You can read the lines of the CSV file using python and put each line as a row of a dataset? I don’t understand what you’d like the label to look like if you want to display a dataset in a label, can you explain?