[Libreoffice] Assertions and Logging
Norbert Thiebaud
nthiebaud at gmail.com
Mon Nov 21 20:46:36 PST 2011
On Mon, Nov 21, 2011 at 6:30 AM, Caolán McNamara <caolanm at redhat.com> wrote:
> On Fri, 2011-11-18 at 15:25 +0100, Stephan Bergmann wrote:
>
>
> Practical question though, is on windows where does the output go ?
Actually I have a similar scheme for my own stuff, and I send the
output to <program>_<pid>.log in the current working directory. if the
current working directory is not writable, I send it to that same file
but in $TMP. For libreoffice an alternative could be the ~/.lo
directory or whatever the equivalent is on windows...
Note that using stderr/stdout may be a problem as that could interfere
with other stuff. on windows there is not always a Console associated
with the execution... and our codebase is also used for other, more
batch oriented piece of code... messing with stderr/stdout may
actually be a pain.
I also have mechnism so that if no message is written, the log file is
actually cleaned-up on termination. iow some kind a mechanism to avoid
these log file to polute too much (maybe a kind of 'clean on startup'
to get rid of old lingering log files)
The biggest issue on windows, is 'flush' (well that is a problem in C
because windows does not do signal handling... but with exception on
C++ maybe there is a way around that)
Norbert
More information about the LibreOffice
mailing list