# Logging

**URL:** <https://forum.inductiveautomation.com/t/logging/4426>\
**Category:** Ignition\
**Created:** [May 8, 2012, 1:54pm UTC](https://forum.inductiveautomation.com/t/logging/4426 "2012-05-08T13:54:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [May 8, 2012, 1:54pm UTC](https://forum.inductiveautomation.com/t/logging/4426/1 "2012-05-08T13:54:33Z")

</div>

`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.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 8, 2012, 5:45pm UTC](https://forum.inductiveautomation.com/t/logging/4426/2 "2012-05-08T17:45:53Z")

</div>

> [@BigSchottkyD](#):
>
> ...I would like to do this without 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?
