source: libcf/trunk/include/cf_log.h@ 109

Last change on this file since 109 was 109, checked in by cheese, 11 years ago

#1 add typical data structure algorithms (linked-list / queue / stak) and rename symbol for context of each modules

File size: 1.1 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/** 로그 옵션 플래그 */
17typedef enum
18{
19 CF_LOG_DEFAULT_BUFFER = -1, /**< 기본 버퍼 크기 사용 */
20 CF_LOG_NO_BUFFER = 0, /**< 버퍼없이 파일에 바로 쓰기 */
21} CF_LOG_OPTION;
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27CF_EXPORT int
28CF_Log_Initialize (const int poolSize);
29
30CF_EXPORT int
31CF_Log_Finalize (void);
32
33CF_EXPORT int
34CF_Log_Open (const int mapid,
35 const char * path,
36 const int memsize);
37
38CF_EXPORT int
39CF_Log_Close (const int mapid);
40
41CF_EXPORT int
42CF_Log_Write (const int mapid,
43 const char * prefix,
44 const char * fmt, ...);
45
46CF_EXPORT int
47CF_Log_Flush (const int mapid);
48
49CF_EXPORT int
50CF_Log_SetMT (const int mapid,
51 const CF_BOOL flag);
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif // #ifndef __CF_LOG_H__
Note: See TracBrowser for help on using the repository browser.