|
-
Mar 15th, 2001, 07:19 AM
#1
Thread Starter
Addicted Member
I have an instant messenger program and that logs each users logs separatly. I need to these files to only allow so many lines so they dont grow out of conrtrol.
Any examples on how this can be accompished?
right now its just appending each entry.
Any help is appriciated.
thanks
Garrett
-
Mar 15th, 2001, 07:44 AM
#2
Fanatic Member
you could have your program open it as input and then split it using the vbctlf as the delimiter and then get the ubound of the array that you assigned to the split function and subtract from it the number of entries that you want to include in the file then you loop through and write the entries from the array starting at the number you got from the subtraction to the ubound to the log.
that should limit the lines that are stored in the data file if you don't understand my incesant rambling that is because i have been up for about 38 hours and i appoligize
-
Mar 15th, 2001, 08:14 AM
#3
Thread Starter
Addicted Member
hmmmmm
not sure I understand.. im a begginer maybe an example would help? anyone?
If I cant limit this im going to have to nix the log code
-
Mar 15th, 2001, 08:17 AM
#4
Fanatic Member
i'll see what i can do but i have to goto sleep so i will post it later tonight(ut us !0:38 Am here and i still havn't gone to bed
-
Mar 15th, 2001, 08:49 AM
#5
Thread Starter
Addicted Member
ok go get some sleep.. 
anyone else have any ideas?
here is a little more info on what I need.
lets say I want to limit the length of the log file to 500 lines. after you reach 500, any lines you add at the top remove the bottom lines to keep it at 500.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|