Changeset 108 in libcf for trunk/src/cf_log.c
- Timestamp:
- 05/31/13 15:49:49 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_log.c
r107 r108 49 49 if (gLogArray.ctxPool[__mapid] == NULL) \ 50 50 return CF_ERROR_LOG_NOT_MAPPED_ID 51 52 #define CHECK_LOG_LEVEL(__mapid) \53 if (gLogArray.level < mapid) \54 return CF_OK55 51 56 52 #define LOCK_LOG_CTX(__ctx) CF_Mutex_Lock (&__ctx->mutex) … … 93 89 CF_Log_Ctx * ctxPool; 94 90 int ctxSize; 95 int level;96 91 } S_CF_LOG_ARRAY, CF_LOG_ARRAY; 97 92 … … 526 521 * 527 522 * @param poolSize 로그 풀 크기로, 로그 아이디 넘버의 최대 값 528 * @param level 로그 레벨529 *530 * @see CF_LOG_NO_LEVEL531 523 */ 532 524 int 533 CF_Log_Initialize (const int poolSize, 534 const int level) 525 CF_Log_Initialize (const int poolSize) 535 526 { 536 527 memset (&gLogArray, 0x00, sizeof (CF_LOG_ARRAY)); … … 543 534 return CF_ERROR_LOG_INITIALIZE; 544 535 gLogArray.ctxSize = poolSize; 545 gLogArray.level = (level == CF_LOG_NO_LEVEL) ? poolSize : level;546 536 } 547 537 … … 591 581 CF_Log_Ctx ctx = NULL; 592 582 593 CHECK_LOG_LEVEL (mapid);594 595 583 result = CF_Log_CreateCtx (path, memsize, &ctx); 596 584 if (result < 0) … … 614 602 CF_Log_Close (const int mapid) 615 603 { 616 CHECK_LOG_LEVEL (mapid);617 618 604 return CF_Log_UnmapCtxID (mapid); 619 605 } … … 687 673 va_list valist; 688 674 689 CHECK_LOG_LEVEL (mapid);690 691 675 result = CF_Log_GetMappedCtx (mapid, &ctx); 692 676 if (result < 0)
Note:
See TracChangeset
for help on using the changeset viewer.