Changeset 1427


Ignore:
Timestamp:
May 3, 2004, 3:24:07 AM (21 years ago)
Author:
bird
Message:

Log errno.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/sys/logstrict.c

    • Property cvs2svn:cvs-rev changed from 1.6 to 1.7
    r1426 r1427  
    272272                                 "   |     |  |   Log Group.\n"
    273273                                 "   |     |  |   |    Message Type.\n"
    274                                  "   |     |  |   |    |      Function Name.\n"
    275                                  "   |     |  |   |    |      |        Millisconds In function (Optional).\n"
    276                                  "   v     v  v   v    v      v        v\n"
    277                                  "xxxxxxxx tt nn gggg dddd function [( ms)]: message\n");
     274                                 "   |     |  |   |    |    errno in hex (0xface if not available).\n"
     275                                 "   |     |  |   |    |    |      Function Name.\n"
     276                                 "   |     |  |   |    |    |      |        Millisconds In function (Optional).\n"
     277                                 "   v     v  v   v    v    v      v        v\n"
     278                                 "xxxxxxxx tt nn gggg dddd eeee function [( ms)]: message\n");
    278279        DosWrite(pInst->hFile, pszMsg, cch, &cb);
    279280    }
     
    646647{
    647648    unsigned        uTS = getTimestamp();
     649    __LIBC_PTHREAD  pThread = __libc_threadCurrentNoAuto();
    648650    char           *pszMsg;
    649651    int             cch;
     
    658660    if (!pvInstance)
    659661    {
    660         __LIBC_PTHREAD  pThread;
    661662        pvInstance = __libc_logDefault();
    662663        if (!pvInstance)
    663664            return uTS;
    664         pThread = __libc_threadCurrentNoAuto();
    665665        if (pThread)
    666666            pcDepth = &pThread->cDefLoggerDepth;
     
    696696
    697697    va_start(args, pszFormat);
    698     cch = __libc_logBuildMsg(pszMsg, pszFormat, args, "%08x %02x %02x %04x Entr %s: ",
    699                              uTS, getTid(), cDepth, __LIBC_LOG_GETGROUP(fGroupAndFlags), pszFunction);
     698    cch = __libc_logBuildMsg(pszMsg, pszFormat, args, "%08x %02x %02x %04x Entr %04x %s: ",
     699                             uTS, getTid(), cDepth, __LIBC_LOG_GETGROUP(fGroupAndFlags),
     700                             pThread ? pThread->iErrNo : 0xface, pszFunction);
    700701    va_end(args);
    701702
     
    724725{
    725726    unsigned        uTS = getTimestamp();
     727    __LIBC_PTHREAD  pThread = __libc_threadCurrentNoAuto();
    726728    char           *pszMsg;
    727729    int             cch;
     
    736738    if (!pvInstance)
    737739    {
    738         __LIBC_PTHREAD pThread;
    739740        pvInstance = __libc_logDefault();
    740741        if (!pvInstance)
    741742            return;
    742         pThread = __libc_threadCurrentNoAuto();
    743743        if (pThread)
    744744            pcDepth = &pThread->cDefLoggerDepth;
     
    782782
    783783    va_start(args, pszFormat);
    784     cch = __libc_logBuildMsg(pszMsg, pszFormat, args, "%08x %02x %02x %04x Leav %s (%2d ms): ",
    785                              uTS, getTid(), cDepth, __LIBC_LOG_GETGROUP(fGroupAndFlags), pszFunction, uTS - uEnterTS);
     784    cch = __libc_logBuildMsg(pszMsg, pszFormat, args, "%08x %02x %02x %04x Leav %04x %s (%2d ms): ",
     785                             uTS, getTid(), cDepth, __LIBC_LOG_GETGROUP(fGroupAndFlags),
     786                             pThread ? pThread->iErrNo : 0xface, pszFunction, uTS - uEnterTS);
    786787    va_end(args);
    787788
     
    809810{
    810811    unsigned        uTS = getTimestamp();
     812    __LIBC_PTHREAD  pThread = __libc_threadCurrentNoAuto();
    811813    char           *pszMsg;
    812814    int             cch;
     
    820822    if (!pvInstance)
    821823    {
    822         __LIBC_PTHREAD pThread;
    823824        pvInstance = __libc_logDefault();
    824825        if (!pvInstance)
    825826            return;
    826         pThread = __libc_threadCurrentNoAuto();
    827827        if (pThread)
    828828            cDepth = pThread->cDefLoggerDepth;
     
    851851    va_start(args, pszFormat);
    852852    if (uEnterTS != ~0)
    853         cch = __libc_logBuildMsg(pszMsg, pszFormat, args, "%08x %02x %02x %04x Mesg %s (%2d ms): ",
    854                                  uTS, getTid(), cDepth, __LIBC_LOG_GETGROUP(fGroupAndFlags), pszFunction, uTS - uEnterTS);
     853        cch = __libc_logBuildMsg(pszMsg, pszFormat, args, "%08x %02x %02x %04x Mesg %04x %s (%2d ms): ",
     854                                 uTS, getTid(), cDepth, __LIBC_LOG_GETGROUP(fGroupAndFlags),
     855                                 pThread ? pThread->iErrNo : 0xface, pszFunction, uTS - uEnterTS);
    855856    else
    856         cch = __libc_logBuildMsg(pszMsg, pszFormat, args, "%08x %02x %02x %04x Mesg %s: ",
    857                                  uTS, getTid(), cDepth, __LIBC_LOG_GETGROUP(fGroupAndFlags), pszFunction);
     857        cch = __libc_logBuildMsg(pszMsg, pszFormat, args, "%08x %02x %02x %04x Mesg %04x %s: ",
     858                                 uTS, getTid(), cDepth, __LIBC_LOG_GETGROUP(fGroupAndFlags),
     859                                 pThread ? pThread->iErrNo : 0xface, pszFunction);
    858860    va_end(args);
    859861
     
    936938    static int      fEnabled = -1;
    937939    unsigned        uTS = getTimestamp();
     940    __LIBC_PTHREAD  pThread = __libc_threadCurrentNoAuto();
    938941    char           *pszMsg;
    939942    int             cch;
     
    958961    if (!pvInstance)
    959962    {
    960         __LIBC_PTHREAD pThread;
    961963        pvInstance = __libc_logDefault();
    962964        if (!pvInstance)
    963965            return;
    964         pThread = __libc_threadCurrentNoAuto();
    965966        if (pThread)
    966967            cDepth = pThread->cDefLoggerDepth;
Note: See TracChangeset for help on using the changeset viewer.