Perhaps there's a happy medium: sprintf()? I am curious to know if putting the output into a char array with sprintf() (to preserve the output formatting) and then writing it with write(). How much additional overhead would this take? Hard to know without trying it.
Is anyone in a position to write some test code that would do this and report back the results? -MC -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin P. Fleming Sent: Saturday, February 11, 2006 7:39 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] asterisk logger - urgent!!! Bob Goddard wrote: > Using fopen/fputs to ONLY append to a file, is quite frankly, stupid. > Change it to open/write and you will be able to trap via the write > return code and errno. Patches to fix bugs are most welcome. Given that these files are written using fprintf (because they are using format strings and long lists of arguments), using write will require allocating memory, building the output there and then calling write(). Seems like an awful lot of work to avoid a simple system administration failure. _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users