/** * @file cf_log.h * @author myusgun * * @remark * 매핑 ID 값을 이용하여 해당 로그에 기록
* 로그 레벨을 적용할 때도 용이하며 define 이나 enumeration 등을 활용하면 좋음 * * @example log.c */ #ifndef __CF_LOG_H__ #define __CF_LOG_H__ #include "cf_base.h" /** * 로그의 버퍼 크기를 기본 값으로 설정 * * @see CF_Log_Open */ #define CF_LOG_BUFFER_DEFAULT -1 /** * 로그 기록 시 버퍼를 사용하지 않고 즉시 기록 * * @see CF_Log_Open */ #define CF_LOG_BUFFER_NO 0 /** * 로그 레벨 사용 안함 * * @see CF_Log_Initialize */ #define CF_LOG_NO_LEVEL -1 #ifdef __cplusplus extern "C" { #endif CF_EXPORT int CF_Log_Initialize (const int poolSize, const int level); CF_EXPORT int CF_Log_Finalize (void); CF_EXPORT int CF_Log_Open (const int mapid, const char * path, const int memsize); CF_EXPORT int CF_Log_Close (const int mapid); CF_EXPORT int CF_Log_Write (const int mapid, const char * prefix, const char * fmt, ...); CF_EXPORT int CF_Log_Flush (const int mapid); CF_EXPORT int CF_Log_SetMT (const int mapid, const CF_BOOL flag); #ifdef __cplusplus } #endif #endif // #ifndef __CF_LOG_H__