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

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

#1 fix interface and add util module

File size: 1.0 KB
Line 
1/**
2 * \file cf_log.h
3 *
4 * \author myusgun <myusgun@gmail.com>
5 *
6 * \brief 로그
7 *
8 * \remarks
9 * 매핑 ID 값을 이용하여 해당 로그에 기록 <br />
10 * 로그 레벨을 적용할 때도 용이하며 define 이나 enumeration 등을 활용하면 좋음
11 *
12 * \example log.c
13 */
14#ifndef __CF_LOG_H__
15#define __CF_LOG_H__
16
17#include "cf_base.h"
18
19/** 로그 옵션 플래그 */
20typedef enum
21{
22 CF_LOG_DEFAULT_BUFFER = -1, /**< 기본 버퍼 크기 사용 */
23 CF_LOG_NO_BUFFER = 0, /**< 버퍼없이 파일에 바로 쓰기 */
24} CF_LOG_OPTION;
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30CF_EXPORT int
31CF_Log_Create (cf_ctx * ctx,
32 const char * path,
33 const int memsize);
34
35CF_EXPORT int
36CF_Log_Destroy (cf_ctx ctx);
37
38CF_EXPORT int
39CF_Log_Write (cf_ctx ctx,
40 const char * prefix,
41 const char * fmt, ...);
42
43CF_EXPORT int
44CF_Log_Flush (cf_ctx ctx);
45
46CF_EXPORT int
47CF_Log_SetMultiThread (cf_ctx ctx);
48
49CF_EXPORT int
50CF_Log_UnsetMultiThread (cf_ctx ctx);
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif // #ifndef __CF_LOG_H__
Note: See TracBrowser for help on using the repository browser.