[Harbour] 2009-01-26 16:47 UTC+0100 Francesco Saverio Giudice (info/at/fsgiudice.com)

Viktor Szakáts harbour.01 at syenar.hu
Mon Jan 26 11:33:04 EST 2009


Hi Francesco,
Yes, removing it didn't cause any problem.

AFAIR the only dependence is hb_ToOutDebug() that I have commented out
> (maybe is it the time to move it outside from xhb ;-) ? ) and used only for
> tests.


Hm, I personally still strongly dislike this set of functions.

The naming, the scope, the API, portability, none of these are
in sync with our general core direction.

We need something ligher, simpler.

If we don't want to use logging in speed critical areas, this simple
function could IMO easily add logging into core. Maybe if we add
a way to setup the filename, it would have some point to have it
in core (and maybe rewritten in C). Also FO_EXCL could be used
here.

#include "fileio.ch"
PROCEDURE LogMsg( cString )
    LOCAL nHandle
    IF (nHandle := iif(hb_FileExists( cFileName ), FOpen( cFileName,
FO_WRITE + FO_DENYWRITE),;
                                              FCreate( cFileName, FC_NORMAL
) ) ) != F_ERROR
       FSeek( nHandle, 0, FS_END)
       FWrite( nHandle, cEvent + hb_osNewLine() )
       FClose( nHandle )
    ENDIF
    RETURN

Brgds,
Viktor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.harbour-project.org/pipermail/harbour/attachments/20090126/a1735c42/attachment.html


More information about the Harbour mailing list