예제 #1
0
파일: test_profile.c 프로젝트: 3van/zlog
int main(int argc, char** argv)
{
	int rc;

	rc = dzlog_init("test_profile.conf", "my_cat");
	if (rc) {
		printf("init failed\n");
		return -1;
	}

	dzlog_info("hello, zlog");

	zlog_profile();

	zlog_fini();
	
	return 0;
}
예제 #2
0
int main(int argc, char** argv)
{
	int rc;
	
	zlog_category_t *zc;

	rc = zlog_init("test_init.conf");
	if (rc) {
		printf("init fail");
		return -2;
	}

	zc = zlog_get_category("my_cat");
	if (!zc) {
		printf("zlog_get_category fail\n");
		zlog_fini();
		return -1;
	}

	ZLOG_INFO(zc, "before update");

	sleep(3);

	rc = zlog_reload("test_init.2.conf");
	if (rc) {
		printf("update fail\n");
	}

	ZLOG_INFO(zc, "after update");

	zlog_profile();

	zlog_fini();

	
	return 0;
}