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
|
---|
[108] | 31 | CF_Log_Initialize (const int poolSize);
|
---|
[11] | 32 |
|
---|
| 33 | CF_EXPORT int
|
---|
| 34 | CF_Log_Finalize (void);
|
---|
| 35 |
|
---|
[40] | 36 | CF_EXPORT int
|
---|
| 37 | CF_Log_Open (const int mapid,
|
---|
| 38 | const char * path,
|
---|
[12] | 39 | const int memsize);
|
---|
| 40 |
|
---|
[11] | 41 | CF_EXPORT int
|
---|
[40] | 42 | CF_Log_Close (const int mapid);
|
---|
[19] | 43 |
|
---|
| 44 | CF_EXPORT int
|
---|
[40] | 45 | CF_Log_Write (const int mapid,
|
---|
[12] | 46 | const char * prefix,
|
---|
| 47 | const char * fmt, ...);
|
---|
| 48 |
|
---|
| 49 | CF_EXPORT int
|
---|
[40] | 50 | CF_Log_Flush (const int mapid);
|
---|
[12] | 51 |
|
---|
[98] | 52 | CF_EXPORT int
|
---|
| 53 | CF_Log_SetMT (const int mapid,
|
---|
| 54 | const CF_BOOL flag);
|
---|
| 55 |
|
---|
[11] | 56 | #ifdef __cplusplus
|
---|
| 57 | }
|
---|
| 58 | #endif
|
---|
| 59 |
|
---|
| 60 | #endif // #ifndef __CF_LOG_H__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.