Last change
on this file since 108 was 108, checked in by cheese, 11 years ago |
#1 remove log-level. log id is used as log level instead.
|
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 |
|
---|
[103] | 16 | /** 로그 옵션 플래그 */
|
---|
| 17 | typedef enum {
|
---|
| 18 | CF_LOG_DEFAULT_BUFFER = -1, /**< 기본 버퍼 크기 사용 */
|
---|
| 19 | CF_LOG_NO_BUFFER = 0, /**< 버퍼없이 파일에 바로 쓰기 */
|
---|
| 20 | } E_CF_LOG_OPTION, CF_LOG_OPTION;
|
---|
[26] | 21 |
|
---|
[11] | 22 | #ifdef __cplusplus
|
---|
| 23 | extern "C" {
|
---|
| 24 | #endif
|
---|
| 25 |
|
---|
| 26 | CF_EXPORT int
|
---|
[108] | 27 | CF_Log_Initialize (const int poolSize);
|
---|
[11] | 28 |
|
---|
| 29 | CF_EXPORT int
|
---|
| 30 | CF_Log_Finalize (void);
|
---|
| 31 |
|
---|
[40] | 32 | CF_EXPORT int
|
---|
| 33 | CF_Log_Open (const int mapid,
|
---|
| 34 | const char * path,
|
---|
[12] | 35 | const int memsize);
|
---|
| 36 |
|
---|
[11] | 37 | CF_EXPORT int
|
---|
[40] | 38 | CF_Log_Close (const int mapid);
|
---|
[19] | 39 |
|
---|
| 40 | CF_EXPORT int
|
---|
[40] | 41 | CF_Log_Write (const int mapid,
|
---|
[12] | 42 | const char * prefix,
|
---|
| 43 | const char * fmt, ...);
|
---|
| 44 |
|
---|
| 45 | CF_EXPORT int
|
---|
[40] | 46 | CF_Log_Flush (const int mapid);
|
---|
[12] | 47 |
|
---|
[98] | 48 | CF_EXPORT int
|
---|
| 49 | CF_Log_SetMT (const int mapid,
|
---|
| 50 | const CF_BOOL flag);
|
---|
| 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.