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