Robust Logging Script
Sarah Reichelt
sarah.reichelt at gmail.com
Thu May 1 17:20:07 EDT 2008
On Thu, May 1, 2008 at 9:52 PM, David Bovill <david at openpartnership.net> wrote:
> Anyone have any experience logging events for several days or more (an event
> happens each second).... is it better to write them out as text files broken
> up into a few hundred lines - or write it to a text file using the append
> syntax (not done this myself). It must be a common task that people have
> done before, but as it would take a day or so to test whether I'd chosen the
> most robust solution well hell thought I'd ask here :)
I tend to accumulate events in a field or custom property and write to
file every so often but not after every event. Showing them in a field
is very useful during testing, but slower than using CPs as the data
gets larger, so once you are sure it is doing what you want, swap to
using CPs, but with a method for displaying them if you need to check.
I would also write to a date-stamped file so that you start a new log
file at midnight. This will keep the file sizes down if the app is
running continuously.
Sarah
More information about the use-livecode
mailing list