the file i/o logger

0 views
Skip to first unread message

Nathan Smith

unread,
Sep 12, 2016, 9:33:28 AM9/12/16
to MOO Talk
hi folks
So I was wondering on what the point in the logger actually is?
I get it makes read proected files in /logs/ but other than that it seems to indicate to still use file_writeline to create the logs?
I was thinking of doing something along the lines of this:
in #0:do_command
file_open("logs/"+tostr(player)+".txt","a-tf");
file_writeline(file, tostr(@args));
file_close(file);

then also in #6:tell
file_open("logs/"+tostr(player)+".txt","a-tf");
file_writeline(file, tostr(@args));
file_close(file);

this would create logs of player aactions and what they see, which could then be stored off server later on via other scripts on the server itself.
My main concern is lag and how much this would actually cause, what with the  open/close/open/close all the time and if there is a bbetter way of doing this.
Thanks

Chris Norman

unread,
Sep 12, 2016, 9:35:37 AM9/12/16
to MOO-...@googlegroups.com

Can I suggest writing the logs to a list somewhere which you could dump to file with $dump_started or whatever? Or just test for a particular length, dump_interval seems like it would be enough.


It feels like one of those things that you might not notice immediately, but would if you got players above a certain level.


HTH,

--
You received this message because you are subscribed to the Google Groups "MOO Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to MOO-talk+u...@googlegroups.com.
To post to this group, send email to MOO-...@googlegroups.com.
Visit this group at https://groups.google.com/group/MOO-talk.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages