-
Notifications
You must be signed in to change notification settings - Fork 0
/
wlog_lua_enums.h
53 lines (43 loc) · 1.2 KB
/
wlog_lua_enums.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* =====================================================================================
*
* Filename: wlog_lua_enums.h
*
* Description:
*
* Version: 1.0
* Created: 26/06/16 18:06:46
* Revision: none
* Compiler: gcc
*
* Author: Di Carlo Walter (DCW),
* Organization:
*
* =====================================================================================
*/
#ifndef __WLOG_LUA_ENUMS_H__
#define __WLOG_LUA_ENUMS_H__
#include "lua.h"
#define LOG_LRAM 1
#define LOG_LCON 2
#define LOG_ERR 1
#define LOG_WARN 2
#define LOG_INFO 3
#define LOG_TRACE 4
#define LOG_DEBUG 5
#define LOG_WEBAPP 1
#define LOG_GEN 1
#define LOG_ALM 2
#define LOG_SYS 3
#define LOG_SQL 4
#define LOG_GUI 5
#define LOG_SRV 6
#define LOG_WEB 7
#define PUSH_ENUM(enum_item) do { \
lua_pushstring(L, #enum_item); /* Push the table index */ \
lua_pushinteger(L, enum_item); /* Push the cell value */ \
lua_rawset(L, -3); /* Stores the pair in the table */ \
} while(0)
extern void lua_push_enums(lua_State *L);
extern const char * wlog_getLevelName(const unsigned int level);
#endif // __WLOG_LUA_ENUMS_H__