Ignore:
Timestamp:
Sep 18, 2011 2:38:46 PM (13 years ago)
Author:
bennylp
Message:

Implemented re #1372: New log features: indentation and thread switching indication

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/log.h

    r3553 r3752  
    8282    PJ_LOG_HAS_COLOR      = 1024, /**< Colorize logs [yes on win32]           */ 
    8383    PJ_LOG_HAS_LEVEL_TEXT = 2048, /**< Include level text string [no]         */ 
    84     PJ_LOG_HAS_THREAD_ID  = 4096  /**< Include thread identification [no]     */ 
     84    PJ_LOG_HAS_THREAD_ID  = 4096, /**< Include thread identification [no]     */ 
     85    PJ_LOG_HAS_THREAD_SWC = 8192, /**< Add mark when thread has switched [yes]*/ 
     86    PJ_LOG_HAS_INDENT     =16384  /**< Indentation. Say yes! [yes]            */ 
    8587}; 
    8688 
     
    204206PJ_DECL(unsigned) pj_log_get_decor(void); 
    205207 
     208/** 
     209 * Add indentation to log message. Indentation will add PJ_LOG_INDENT_CHAR 
     210 * before the message, and is useful to show the depth of function calls. 
     211 * 
     212 * @param indent    The indentation to add or substract. Positive value 
     213 *                  adds current indent, negative value subtracts current 
     214 *                  indent. 
     215 */ 
     216PJ_DECL(void) pj_log_add_indent(int indent); 
     217 
     218/** 
     219 * Push indentation to the right by default value (PJ_LOG_INDENT). 
     220 */ 
     221PJ_DECL(void) pj_log_push_indent(void); 
     222 
     223/** 
     224 * Pop indentation (to the left) by default value (PJ_LOG_INDENT). 
     225 */ 
     226PJ_DECL(void) pj_log_pop_indent(void); 
    206227 
    207228/** 
Note: See TracChangeset for help on using the changeset viewer.