Permalink
Browse files

version: real 1.0.7

  • Loading branch information...
HardySimpson committed Jun 19, 2012
1 parent 2a194f9 commit c7a937a67f58b0f444354abc815a3dba4f79905d
Showing with 33 additions and 16 deletions.
  1. +5 −2 Makefile.am
  2. +3 −1 TODO
  3. +12 −0 configure.ac
  4. +1 −1 devconf.sh
  5. +12 −12 libzlog/zlog.h
View
@@ -1,12 +1,15 @@
SUBDIRS = \
libzlog \
- tools \
- doc
+ tools
if ENABLE_TEST
SUBDIRS += test
endif
+if ENABLE_DOC
+SUBDIRS += doc
+endif
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = zlog.pc
View
4 TODO
@@ -1,12 +1,14 @@
[p] 使用valgrind测试性能
-[p] 自己实现部分的strftime,进一步提高效率
[ ] 增加man age, df, 案例
[ ] 和rsyslog对接的问题
[ ] hzlog的可定制话
[ ] 分类匹配的可定制化
[ ] 兼容性问题
zlog.h内,__VA_ARGS__的跨平台
+[ ] 去除auto tools的使用,用redis那样的自行makefile
+--- 1.0.7 ---
+[x] 自己实现部分的strftime,进一步提高效率--替换后发现vsnprintf消耗增加,未能超越原有strftime的效率
--- 1.0.6 ---
[o] 每秒取一次localtime_r,加速1倍以上
--- 1.0.5 ---
View
@@ -53,6 +53,18 @@ AC_ARG_ENABLE(test,
AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
+AC_ARG_ENABLE(doc,
+ [AC_HELP_STRING([--enable-doc], [Create pdf from lyx])],
+ enable_doc=yes)
+
+# Checks for lyx
+AC_PATH_PROG(LYX, lyx, )
+if test x$LYX = x; then
+ enable_doc=no
+fi
+
+AM_CONDITIONAL(ENABLE_DOC, test x$enable_doc = xyes)
+
AC_CONFIG_FILES([
zlog.pc
Makefile
View
@@ -2,4 +2,4 @@
# from configure,Makefile.am->Makefile, developer use
-CFLAGS="-Wall -Werror -g -O2 -std=c99" ./configure --prefix=/opt/develop/ --enable-test
+CFLAGS="-Wall -Werror -g -O2 -std=c99" ./configure --prefix=/opt/develop/ --enable-test --enable-doc
View
@@ -89,41 +89,41 @@ typedef enum {
/* zlog macros */
#define ZLOG_FATAL(cat, format, ...) \
zlog(cat, __FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_FATAL, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_FATAL, format , ## __VA_ARGS__)
#define ZLOG_ERROR(cat, format, ...) \
zlog(cat, __FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_ERROR, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_ERROR, format , ## __VA_ARGS__)
#define ZLOG_WARN(cat, format, ...) \
zlog(cat, __FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_WARN, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_WARN, format , ## __VA_ARGS__)
#define ZLOG_NOTICE(cat, format, ...) \
zlog(cat, __FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_NOTICE, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_NOTICE, format , ## __VA_ARGS__)
#define ZLOG_INFO(cat, format, ...) \
zlog(cat, __FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_INFO, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_INFO, format , ## __VA_ARGS__)
#define ZLOG_DEBUG(cat, format, ...) \
zlog(cat, __FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_DEBUG, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_DEBUG, format , ## __VA_ARGS__)
/* dzlog macros */
#define DZLOG_FATAL(format, ...) \
ddzlog(__FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_FATAL, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_FATAL, format , ## __VA_ARGS__)
#define DZLOG_ERROR(format, ...) \
dzlog(__FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_ERROR, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_ERROR, format , ## __VA_ARGS__)
#define DZLOG_WARN(format, ...) \
dzlog(__FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_WARN, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_WARN, format , ## __VA_ARGS__)
#define DZLOG_NOTICE(format, ...) \
dzlog(__FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_NOTICE, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_NOTICE, format , ## __VA_ARGS__)
#define DZLOG_INFO(format, ...) \
dzlog(__FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_INFO, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_INFO, format , ## __VA_ARGS__)
#define DZLOG_DEBUG(format, ...) \
dzlog(__FILE__, sizeof(__FILE__)-1, __func__, sizeof(__func__)-1, __LINE__, \
- ZLOG_LEVEL_DEBUG, format, ## __VA_ARGS__)
+ ZLOG_LEVEL_DEBUG, format , ## __VA_ARGS__)
#elif defined __GNUC__
/* zlog macros */
#define ZLOG_FATAL(cat, format, args...) \

0 comments on commit c7a937a

Please sign in to comment.