Changeset 2758


Ignore:
Timestamp:
Aug 13, 2006, 12:51:31 AM (19 years ago)
Author:
bird
Message:

Prefix the log messages with tid+time so I can make some sense of all this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/synergy/lib/base/CLog.cpp

    r2749 r2758  
    2121#include <cstdio>
    2222#include <cstring>
     23#ifdef __OS2__
     24# include <InnoTekLIBC/FastInfoBlocks.h>
     25#endif
    2326
    2427// names of priorities
     
    4649
    4750// length of longest string in g_priority
     51#ifdef __OS2__
     52static const int                g_maxPriorityLength = 7 + 30;
     53#else
    4854static const int                g_maxPriorityLength = 7;
     55#endif
    4956
    5057// length of suffix string (": ")
     
    252259        int n = -g_prioritySuffixLength;
    253260        if (priority >= 0) {
     261#ifdef __OS2__
     262        char sz[80];
     263        snprintf(sz, sizeof(sz), "%d %d %s", fibGetMsCount(), fibGetTid(), g_priority[priority]);
     264                n = strlen(sz);
     265        assert(n <= g_maxPriorityLength);
     266                strcpy(msg + g_maxPriorityLength - n, sz);
     267#else
    254268                n = strlen(g_priority[priority]);
    255269                strcpy(msg + g_maxPriorityLength - n, g_priority[priority]);
     270#endif
    256271                msg[g_maxPriorityLength + 0] = ':';
    257                 msg[g_maxPriorityLength + 1] = ' ';
    258272                msg[g_maxPriorityLength + 1] = ' ';
    259273        }
Note: See TracChangeset for help on using the changeset viewer.