Server_ChatLogginglet me know if you have any issues; it logs connections and chat/teamchat and also records them in 2 different places (blid and mashes them), they are recorded based on their date instead of 1 giant file in config/server/ChatLog/
If I remember, if the server crashes when the file object is open for write it will be blank.
new fileobject(fo);fo.openforwrite("base/file.txt");fo.writeline("Test1");crash();[]new fileobject(fo);fo.openforwrite("base/file.txt");fo.writeline("Test1");fo.close();crash();[Test1]new fileobject(fo);fo.openforwrite("base/file.txt");fo.writeline("Test1");fo.close();fo.openforappend("base/file.txt");fo.writeline("Test2");crash();[Test1]new fileobject(fo);fo.openforwrite("base/file.txt");fo.writeline("Test1");fo.close();fo.openforappend("base/file.txt");fo.writeline("Test2");fo.close();crash();[Test1Test2]
No, but it's safe and allows you to look at the file in realtime.
You're already using append and closing it anyway. The only problem I see with yours is that it only stores it by ID. It would be nice to see the whole chat in one log, maybe by date, so that the context of what the person is saying is present.