Robust Logging Script

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Robust Logging Script

david bovill
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 :)

NB - I'll be logging geopositions and when I get the plotting code done
(thanks to all the help with the Shift Left operator guys) - i'll be able to
plot the paths on the map.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Robust Logging Script

masmit
I've had log files that I let run up to about 3 to 4 mb - it didn't  
seem to cause a problem.

Best,

Mark

On 1 May 2008, at 12:52, David Bovill 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 :)
>
> NB - I'll be logging geopositions and when I get the plotting code  
> done
> (thanks to all the help with the Shift Left operator guys) - i'll  
> be able to
> plot the paths on the map.
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Robust Logging Script

Sarah Reichelt-2
In reply to this post by david bovill
On Thu, May 1, 2008 at 9:52 PM, David Bovill <[hidden email]> 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
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Robust Logging Script

Jim Ault
On 5/1/08 2:20 PM, "Sarah Reichelt" <[hidden email]> wrote:

> On Thu, May 1, 2008 at 9:52 PM, David Bovill <[hidden email]>
> 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
------------
A few suggestions from my limited experience:

1  devise a very terse encoding for older messages to keep the size much
smaller.  You can scan the file to convert back to verbose mode if needed

2  sequentially name (the seconds & "logEvents.txt") and start a new one if
the number of chars > yourMaxSizeDesired

3  keep the log in RAM, such as a custom property, and write once.

4  use the compress command in Rev to reduce file size

5  send yourself an email when the new file is created

6  send yourself an email and include the logFile.zip as an attachment

7  filter the log lines for "*error*" or such and create an 'errLog.txt'

8  email only the errors to you along with the time and date stamp

Hope this helps

Jim Ault
Las Vegas


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution