comlog.range 1.0 KB
Newer Older
W
wangguibao 已提交
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
struct appender_t{
	string type;
	string path;
	string file;
	string auth = default("");
	string reserved1 = default("");
	string reserved2 = default("");
	string reserved3 = default("");
	string reserved4 = default("");

	string split_type = default("TRUNCT");//切割方式
	uint32_t log_size = default(2048);//回滚日志的大小
	int32_t open = range(0,1), default(1);//是否启用
	int32_t compress = range(0,1), default(0);//是否压缩
	uint32_t cuttime = default(60);//切割周期

	uint32_t syslevel = range(0,31), default(16);//支持的系统日志级别
	string selflevel = default("");//支持的自定义日志级别
	string layout = default("");//打印出来的日志的格式
	string layout_ndc = default("");//打印的Key:value对的格式
};


struct comlog_t{
	string procname = default("NoModuleName");//进程名
	int32_t level = default(16);//日志级别的总控开关
	appender_t device[];//设备数组
	string selfdefine = default("");//自定义级别
};

comlog_t comlog;
int32_t tt = default(16);

struct A{
   int32_t a;
};

struct B{
   uint32_t b;
};

struct C{
   A a;
   B b;
   int32_t tt;
   A a2;
};

C c;