Changeset 16 in libcf for trunk/test/test.c


Ignore:
Timestamp:
02/01/13 09:37:19 (11 years ago)
Author:
cheese
Message:

#1 add function for non-context debugging message printing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/test.c

    r15 r16  
    2525    gLogCtx = CF_Log_CreateCtx (file, CF_LOG_BUFFER_DEFAULT);
    2626    if (gDebugCtx == NULL)
    27         CF_DEBUG_TRACE (gDebugCtx, "create debug ctx error\n");
     27        CF_DEBUG_PRINT (stderr, "create debug ctx error\n");
    2828
    2929    for (i = 0 ; i < 10000 ; i++)
     
    4949    CF_DEBUG_CALLSTACK_PUSH (gDebugCtx);
    5050
    51     fd = CF_File_Open (file, RO);
     51    fd = CF_File_Open (file, CF_FILE_RO);
    5252    if (fd < 0)
    5353        CF_DEBUG_TRACE (gDebugCtx, "what the ... file open ?\n");
     
    101101
    102102    if (gLogCtx == NULL)
    103         CF_DEBUG_TRACE (gDebugCtx, "create log ctx error\n");
     103        CF_DEBUG_PRINT (stderr, "create log ctx error\n");
    104104
    105105    CF_DEBUG_CALLSTACK_PUSH (gDebugCtx);
    106106
    107     CF_DEBUG_TRACE (gDebugCtx, " == LOG TEST ==\n");
     107    CF_DEBUG_PRINT (stderr, " == LOG TEST ==\n");
    108108    log_test ("LOG_TEST");
    109109
    110     CF_DEBUG_TRACE (gDebugCtx, " == FILE READ TEST ==\n");
     110    CF_DEBUG_PRINT (stderr, " == FILE READ TEST ==\n");
    111111    file_test ("FILE_READ_TEST");
    112112
    113     CF_DEBUG_TRACE (gDebugCtx, " == CALLSTACK TEST ==\n");
     113    CF_DEBUG_PRINT (stderr, " == CALLSTACK TEST ==\n");
    114114    callee1 ();
    115115
    116116    CF_DEBUG_CALLSTACK_POP (gDebugCtx, &gDebugCallstack);
    117117
    118     CF_DEBUG_TRACE (gDebugCtx, " == END OF TEST ==\n");
     118    CF_DEBUG_PRINT (stderr, " == END OF TEST ==\n");
    119119    CF_DEBUG_TRACE (gDebugCtx, "here is the end of function [file:%s line:%d func:%s]\n",
    120120                                gDebugCallstack.file,
Note: See TracChangeset for help on using the changeset viewer.