source:
libcf/trunk/include/cf_log.h@
66
Last change on this file since 66 was 66, checked in by , 11 years ago | |
---|---|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[23] | 1 | /** |
[26] | 2 | * @file cf_log.h |
3 | * @author myusgun <myusgun@gmail.com> | |
[34] | 4 | * |
[66] | 5 | * @remark |
6 | * 매핑 ID 값을 이용하여 해당 로그에 기록 <br /> | |
7 | * 로그 레벨을 적용할 때도 용이하며 define 이나 enumeration 등을 활용하면 좋음 | |
8 | * | |
[35] | 9 | * @example log.c |
[11] | 10 | */ |
11 | #ifndef __CF_LOG_H__ | |
12 | #define __CF_LOG_H__ | |
13 | ||
14 | #include "cf_base.h" | |
15 | ||
[26] | 16 | /** |
17 | * 로그의 버퍼 크기를 기본 값으로 설정 | |
18 | * | |
[40] | 19 | * @see CF_Log_Open |
[26] | 20 | */ |
[12] | 21 | #define CF_LOG_BUFFER_DEFAULT -1 |
[26] | 22 | |
[38] | 23 | /** |
24 | * 로그 기록 시 버퍼를 사용하지 않고 즉시 기록 | |
[26] | 25 | * |
[40] | 26 | * @see CF_Log_Open |
[26] | 27 | */ |
[12] | 28 | #define CF_LOG_BUFFER_NO 0 |
[11] | 29 | |
30 | #ifdef __cplusplus | |
31 | extern "C" { | |
32 | #endif | |
33 | ||
34 | CF_EXPORT int | |
[12] | 35 | CF_Log_Initialize (const int logPool); |
[11] | 36 | |
37 | CF_EXPORT int | |
38 | CF_Log_Finalize (void); | |
39 | ||
[40] | 40 | CF_EXPORT int |
41 | CF_Log_Open (const int mapid, | |
42 | const char * path, | |
[12] | 43 | const int memsize); |
44 | ||
[11] | 45 | CF_EXPORT int |
[40] | 46 | CF_Log_Close (const int mapid); |
[19] | 47 | |
48 | CF_EXPORT int | |
[40] | 49 | CF_Log_SetMT (const int mapid, |
50 | const CF_BOOL flag); | |
[11] | 51 | |
[12] | 52 | CF_EXPORT int |
[40] | 53 | CF_Log_Write (const int mapid, |
[12] | 54 | const char * prefix, |
55 | const char * fmt, ...); | |
56 | ||
57 | CF_EXPORT int | |
[40] | 58 | CF_Log_Flush (const int mapid); |
[12] | 59 | |
[11] | 60 | #ifdef __cplusplus |
61 | } | |
62 | #endif | |
63 | ||
64 | #endif // #ifndef __CF_LOG_H__ |
Note:
See TracBrowser
for help on using the repository browser.