source:
libcf/trunk/include/cf_log.h@
151
Last change on this file since 151 was 151, checked in by , 11 years ago | |
---|---|
File size: 1.0 KB |
Rev | Line | |
---|---|---|
[23] | 1 | /** |
[128] | 2 | * \file cf_log.h |
[34] | 3 | * |
[128] | 4 | * \author myusgun <myusgun@gmail.com> |
5 | * | |
[119] | 6 | * \brief 로그 |
[116] | 7 | * |
[119] | 8 | * \remarks |
[66] | 9 | * 매핑 ID 값을 이용하여 해당 로그에 기록 <br /> |
10 | * 로그 레벨을 적용할 때도 용이하며 define 이나 enumeration 등을 활용하면 좋음 | |
11 | * | |
[119] | 12 | * \example log.c |
[11] | 13 | */ |
14 | #ifndef __CF_LOG_H__ | |
15 | #define __CF_LOG_H__ | |
16 | ||
17 | #include "cf_base.h" | |
18 | ||
[103] | 19 | /** 로그 옵션 플래그 */ |
[109] | 20 | typedef enum |
21 | { | |
[103] | 22 | CF_LOG_DEFAULT_BUFFER = -1, /**< 기본 버퍼 크기 사용 */ |
23 | CF_LOG_NO_BUFFER = 0, /**< 버퍼없이 파일에 바로 쓰기 */ | |
[109] | 24 | } CF_LOG_OPTION; |
[26] | 25 | |
[11] | 26 | #ifdef __cplusplus |
27 | extern "C" { | |
28 | #endif | |
29 | ||
30 | CF_EXPORT int | |
[151] | 31 | CF_Log_Create (cf_ctx * ctx, |
[40] | 32 | const char * path, |
[12] | 33 | const int memsize); |
34 | ||
[11] | 35 | CF_EXPORT int |
[151] | 36 | CF_Log_Destroy (cf_ctx ctx); |
[19] | 37 | |
38 | CF_EXPORT int | |
[151] | 39 | CF_Log_Write (cf_ctx ctx, |
[12] | 40 | const char * prefix, |
41 | const char * fmt, ...); | |
42 | ||
43 | CF_EXPORT int | |
[151] | 44 | CF_Log_Flush (cf_ctx ctx); |
[12] | 45 | |
[98] | 46 | CF_EXPORT int |
[151] | 47 | CF_Log_SetMultiThread (cf_ctx ctx); |
[98] | 48 | |
[151] | 49 | CF_EXPORT int |
50 | CF_Log_UnsetMultiThread (cf_ctx ctx); | |
51 | ||
[11] | 52 | #ifdef __cplusplus |
53 | } | |
54 | #endif | |
55 | ||
56 | #endif // #ifndef __CF_LOG_H__ |
Note:
See TracBrowser
for help on using the repository browser.