Last change
on this file since 103 was 103, checked in by cheese, 11 years ago |
#1 fix some symbol names, test code and exception handling logic
|
File size:
1.2 KB
|
Line | |
---|
1 | /**
|
---|
2 | * @file cf_log.h
|
---|
3 | * @author myusgun <myusgun@gmail.com>
|
---|
4 | *
|
---|
5 | * @remark
|
---|
6 | * 매핑 ID 값을 이용하여 해당 로그에 기록 <br />
|
---|
7 | * 로그 레벨을 적용할 때도 용이하며 define 이나 enumeration 등을 활용하면 좋음
|
---|
8 | *
|
---|
9 | * @example log.c
|
---|
10 | */
|
---|
11 | #ifndef __CF_LOG_H__
|
---|
12 | #define __CF_LOG_H__
|
---|
13 |
|
---|
14 | #include "cf_base.h"
|
---|
15 |
|
---|
16 | /** 로그 옵션 플래그 */
|
---|
17 | typedef enum {
|
---|
18 | CF_LOG_DEFAULT_BUFFER = -1, /**< 기본 버퍼 크기 사용 */
|
---|
19 | CF_LOG_NO_BUFFER = 0, /**< 버퍼없이 파일에 바로 쓰기 */
|
---|
20 | CF_LOG_NO_LEVEL = -1, /**< 로그 레벨 사용 안함 */
|
---|
21 | } E_CF_LOG_OPTION, CF_LOG_OPTION;
|
---|
22 |
|
---|
23 | #ifdef __cplusplus
|
---|
24 | extern "C" {
|
---|
25 | #endif
|
---|
26 |
|
---|
27 | CF_EXPORT int
|
---|
28 | CF_Log_Initialize (const int poolSize,
|
---|
29 | const int level);
|
---|
30 |
|
---|
31 | CF_EXPORT int
|
---|
32 | CF_Log_Finalize (void);
|
---|
33 |
|
---|
34 | CF_EXPORT int
|
---|
35 | CF_Log_Open (const int mapid,
|
---|
36 | const char * path,
|
---|
37 | const int memsize);
|
---|
38 |
|
---|
39 | CF_EXPORT int
|
---|
40 | CF_Log_Close (const int mapid);
|
---|
41 |
|
---|
42 | CF_EXPORT int
|
---|
43 | CF_Log_Write (const int mapid,
|
---|
44 | const char * prefix,
|
---|
45 | const char * fmt, ...);
|
---|
46 |
|
---|
47 | CF_EXPORT int
|
---|
48 | CF_Log_Flush (const int mapid);
|
---|
49 |
|
---|
50 | CF_EXPORT int
|
---|
51 | CF_Log_SetMT (const int mapid,
|
---|
52 | const CF_BOOL flag);
|
---|
53 |
|
---|
54 | #ifdef __cplusplus
|
---|
55 | }
|
---|
56 | #endif
|
---|
57 |
|
---|
58 | #endif // #ifndef __CF_LOG_H__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.