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 | * 로그의 버퍼 크기를 기본 값으로 설정
|
---|
18 | *
|
---|
19 | * @see CF_Log_Open
|
---|
20 | */
|
---|
21 | #define CF_LOG_BUFFER_DEFAULT -1
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * 로그 기록 시 버퍼를 사용하지 않고 즉시 기록
|
---|
25 | *
|
---|
26 | * @see CF_Log_Open
|
---|
27 | */
|
---|
28 | #define CF_LOG_BUFFER_NO 0
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * 로그 레벨 사용 안함
|
---|
32 | *
|
---|
33 | * @see CF_Log_Initialize
|
---|
34 | */
|
---|
35 | #define CF_LOG_NO_LEVEL -1
|
---|
36 |
|
---|
37 | #ifdef __cplusplus
|
---|
38 | extern "C" {
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | CF_EXPORT int
|
---|
42 | CF_Log_Initialize (const int poolSize,
|
---|
43 | const int level);
|
---|
44 |
|
---|
45 | CF_EXPORT int
|
---|
46 | CF_Log_Finalize (void);
|
---|
47 |
|
---|
48 | CF_EXPORT int
|
---|
49 | CF_Log_Open (const int mapid,
|
---|
50 | const char * path,
|
---|
51 | const int memsize);
|
---|
52 |
|
---|
53 | CF_EXPORT int
|
---|
54 | CF_Log_Close (const int mapid);
|
---|
55 |
|
---|
56 | CF_EXPORT int
|
---|
57 | CF_Log_Write (const int mapid,
|
---|
58 | const char * prefix,
|
---|
59 | const char * fmt, ...);
|
---|
60 |
|
---|
61 | CF_EXPORT int
|
---|
62 | CF_Log_Flush (const int mapid);
|
---|
63 |
|
---|
64 | CF_EXPORT int
|
---|
65 | CF_Log_SetMT (const int mapid,
|
---|
66 | const CF_BOOL flag);
|
---|
67 |
|
---|
68 | #ifdef __cplusplus
|
---|
69 | }
|
---|
70 | #endif
|
---|
71 |
|
---|
72 | #endif // #ifndef __CF_LOG_H__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.