Skip to content

Commit

Permalink
UPDATE TO V1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinwilliams committed Jun 23, 2018
1 parent d9a2930 commit 4b9f69b
Show file tree
Hide file tree
Showing 64 changed files with 1,960 additions and 869 deletions.
5 changes: 5 additions & 0 deletions ChangeLog-CN
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
ver 1.2.0 2018-06-23 calvin
* src/LOGCONF.?�Ƶ���src-conf-kvfile/LOGCONF_KVFILE.?
* src/LOGSCONF.?�Ƶ���src-conf-kvfile/LOGSCONF_KVFILE.?
* ����Ŀ¼test-conf-kvfile

ver 1.1.1 2018-06-23 calvin
* ������־������͡��ȼ��ꡢ�����Ϻ����Чֵ��
* ��������SetLogStylesEx��SetLogStylesExG�������÷���ǰ�ú������ӣ�Ҳ����ȫ����־����汾
* ��������GetLogHandle��SetLogHandle���ڵõ�������ȫ����־�����Ҳ����ȫ����־����汾
Expand Down
22 changes: 11 additions & 11 deletions doc/iLOG3 Quick Start II.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,17 @@ int test_iLOG3SERVER()
SetLogStylesG( LOG_STYLES_TEST , LOG_NO_STYLEFUNC );

/* �����־ */
DebugLogG( __FILE__ , __LINE__ , "hello DEBUG" );
InfoLogG( __FILE__ , __LINE__ , "hello INFO" );
WarnLogG( __FILE__ , __LINE__ , "hello WARN" );
ErrorLogG( __FILE__ , __LINE__ , "hello ERROR" );
FatalLogG( __FILE__ , __LINE__ , "hello FATAL" );

DebugHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello DEBUG" );
InfoHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello INFO" );
WarnHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello WARN" );
ErrorHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello ERROR" );
FatalHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello FATAL" );
WriteDebugLogG( __FILE__ , __LINE__ , "hello DEBUG" );
WriteInfoLogG( __FILE__ , __LINE__ , "hello INFO" );
WriteWarnLogG( __FILE__ , __LINE__ , "hello WARN" );
WriteErrorLogG( __FILE__ , __LINE__ , "hello ERROR" );
WriteFatalLogG( __FILE__ , __LINE__ , "hello FATAL" );

WriteDebugHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello DEBUG" );
WriteInfoHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello INFO" );
WriteWarnHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello WARN" );
WriteErrorHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello ERROR" );
WriteFatalHexLogG( __FILE__ , __LINE__ , buffer , buflen , "hello FATAL" );

/* �ͷ���־��� */
DestroyLogHandleG();
Expand Down
12 changes: 6 additions & 6 deletions doc/iLOG3 Quick Start III.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ int test_filterlog()
SetLogStylesG( LOG_STYLES_FILTERLOG , LOG_NO_STYLEFUNC );
SetFilterLogFuncG( & FilterLog );

DebugLogG( __FILE__ , __LINE__ , "hello DEBUG" );
InfoLogG( __FILE__ , __LINE__ , "hello INFO" );
WarnLogG( __FILE__ , __LINE__ , "hello WARN" );
ErrorLogG( __FILE__ , __LINE__ , "hello ERROR" );
FatalLogG( __FILE__ , __LINE__ , "hello FATAL" );
WriteDebugLogG( __FILE__ , __LINE__ , "hello DEBUG" );
WriteInfoLogG( __FILE__ , __LINE__ , "hello INFO" );
WriteWarnLogG( __FILE__ , __LINE__ , "hello WARN" );
WriteErrorLogG( __FILE__ , __LINE__ , "hello ERROR" );
WriteFatalLogG( __FILE__ , __LINE__ , "hello FATAL" );

DestroyLogHandleG();
printf( "���پ������\n" );
Expand Down Expand Up @@ -159,7 +159,7 @@ int test_afterrotatefile()

for( l = 1 ; l <= 10000 ; l++ )
{
InfoLogG( __FILE__ , __LINE__ , "log" );
WriteInfoLogG( __FILE__ , __LINE__ , "log" );
}

DestroyLogHandleG();
Expand Down
68 changes: 34 additions & 34 deletions doc/iLOG3 Quick Start IV.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ int test_hello()
SetLogLevel( g , LOG_LEVEL_INFO );
SetLogStyles( g , LOG_STYLES_HELLO , LOG_NO_STYLEFUNC );

DebugLog( g , __FILE__ , __LINE__ , "hello DEBUG" );
InfoLog( g , __FILE__ , __LINE__ , "hello INFO" );
WarnLog( g , __FILE__ , __LINE__ , "hello WARN" );
ErrorLog( g , __FILE__ , __LINE__ , "hello ERROR" );
FatalLog( g , __FILE__ , __LINE__ , "hello FATAL" );
WriteDebugLog( g , __FILE__ , __LINE__ , "hello DEBUG" );
WriteInfoLog( g , __FILE__ , __LINE__ , "hello INFO" );
WriteWarnLog( g , __FILE__ , __LINE__ , "hello WARN" );
WriteErrorLog( g , __FILE__ , __LINE__ , "hello ERROR" );
WriteFatalLog( g , __FILE__ , __LINE__ , "hello FATAL" );

DebugHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );
InfoHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );
WarnHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );
ErrorHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );
FatalHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );
WriteDebugHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );
WriteInfoHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );
WriteWarnHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );
WriteErrorHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );
WriteFatalHexLog( g , __FILE__ , __LINE__ , buffer , buflen , "������[%ld]" , buflen );

DestroyLogHandle( g );
printf( "������־���\n" );
Expand Down Expand Up @@ -90,12 +90,12 @@ test_hello.log
����������������־�������
[code]
/* д��־���� */
_WINDLL_FUNC int WriteLog( LOG *g , char *c_filename , long c_fileline , int log_level , char *format , ... );
_WINDLL_FUNC int DebugLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int InfoLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WarnLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int ErrorLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int FatalLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteLevelLog( LOG *g , char *c_filename , long c_fileline , int log_level , char *format , ... );
_WINDLL_FUNC int WriteDebugLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteInfoLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteWarnLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteErrorLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteFatalLog( LOG *g , char *c_filename , long c_fileline , char *format , ... );
/*
ʹ��ʾ��
InfoLog( g , __FILE__ , __LINE__ , "xxx������ɣ������[%d]" , nret );
Expand Down Expand Up @@ -125,12 +125,12 @@ INFOLOG( g , "xxx
[code]
#if ( defined _WIN32 ) || ( defined __linux__ ) || ( defined _AIX )
/* д��־�����������̱߳��ش洢��ȱʡ��־����ĺ������ϰ汾�� */
_WINDLL_FUNC int WriteLogG( char *c_filename , long c_fileline , int log_level , char *format , ... );
_WINDLL_FUNC int DebugLogG( char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int InfoLogG( char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WarnLogG( char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int ErrorLogG( char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int FatalLogG( char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteLevelLogG( char *c_filename , long c_fileline , int log_level , char *format , ... );
_WINDLL_FUNC int WriteDebugLogG( char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteInfoLogG( char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteWarnLogG( char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteErrorLogG( char *c_filename , long c_fileline , char *format , ... );
_WINDLL_FUNC int WriteFatalLogG( char *c_filename , long c_fileline , char *format , ... );
/*
ʹ��ʾ��
InfoLogG( __FILE__ , __LINE__ , "xxx������ɣ������[%d]" , nret );
Expand Down Expand Up @@ -179,12 +179,12 @@ _WINDLL_FUNC int SetLogStyleFuncDirectlyG( funcLogStyle *pfuncLogStyle );
�������־��ʮ�����ƣ�������־һ����������ȫ��ԭ��
[code]
/* дʮ�����ƿ���־���� */
_WINDLL_FUNC int WriteHexLog( LOG *g , char *c_filename , long c_fileline , int log_level , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int DebugHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int InfoHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WarnHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int ErrorHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int FatalHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteLevelHexLog( LOG *g , char *c_filename , long c_fileline , int log_level , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteDebugHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteInfoHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteWarnHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteErrorHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteFatalHexLog( LOG *g , char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
/* дʮ�����ƿ���־�Ŀɱ������ */
#if ( defined __STDC_VERSION__ ) && ( __STDC_VERSION__ >= 199901 )
#define WRITEHEXLOG( _g_ , _log_level_ , _buf_ , _buf_size_ , ... ) WriteHexLog( _g_ , __FILE__ , __LINE__ , _log_level_ , _buf_ , _buf_size_ , __VA_ARGS__ );
Expand All @@ -197,12 +197,12 @@ _WINDLL_FUNC int FatalHexLog( LOG *g , char *c_filename , long c_fileline , char

#if ( defined _WIN32 ) || ( defined __linux__ ) || ( defined _AIX )
/* дʮ�����ƿ���־�����������̱߳��ش洢��ȱʡ��־����ĺ������ϰ汾�� */
_WINDLL_FUNC int WriteHexLogG( char *c_filename , long c_fileline , int log_level , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int DebugHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int InfoHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WarnHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int ErrorHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int FatalHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteLevelHexLogG( char *c_filename , long c_fileline , int log_level , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteDebugHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteInfoHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteWarnHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteErrorHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
_WINDLL_FUNC int WriteFatalHexLogG( char *c_filename , long c_fileline , char *buffer , long buflen , char *format , ... );
/* дʮ�����ƿ���־�Ŀɱ�����꣨�����̱߳��ش洢��ȱʡ��־����ĺ������ϰ汾�� */
#if ( defined __STDC_VERSION__ ) && ( __STDC_VERSION__ >= 199901 )
#define WRITEHEXLOGG( _log_level_ , _buf_ , _buf_size_ , ... ) WriteHexLogG( __FILE__ , __LINE__ , _log_level_ , _buf_ , _buf_size_ , __VA_ARGS__ );
Expand Down
20 changes: 10 additions & 10 deletions doc/iLOG3 Quick Start VIII.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ int test_logc()
SetLogFile( "%s/log/test_logc.log" , getenv("HOME") );
SetLogLevel( LOGLEVEL_INFO );

DebugLog( __FILE__ , __LINE__ , "call DebugLog" );
InfoLog( __FILE__ , __LINE__ , "call InfoLog" );
WarnLog( __FILE__ , __LINE__ , "call WarnLog" );
ErrorLog( __FILE__ , __LINE__ , "call ErrorLog" );
FatalLog( __FILE__ , __LINE__ , "call FatalLog" );
WriteDebugLog( __FILE__ , __LINE__ , "call DebugLog" );
WriteInfoLog( __FILE__ , __LINE__ , "call InfoLog" );
WriteWarnLog( __FILE__ , __LINE__ , "call WarnLog" );
WriteErrorLog( __FILE__ , __LINE__ , "call ErrorLog" );
WriteFatalLog( __FILE__ , __LINE__ , "call FatalLog" );

memset( buf , 0x00 , sizeof(buf) );
buflen = sizeof(buf) - 1 ;
DebugHexLog( __FILE__ , __LINE__ , buf , buflen , "call DebugHexLog" );
InfoHexLog( __FILE__ , __LINE__ , buf , buflen , "call InfoHexLog" );
WarnHexLog( __FILE__ , __LINE__ , buf , buflen , "call WarnHexLog" );
ErrorHexLog( __FILE__ , __LINE__ , buf , buflen , "call ErrorHexLog" );
FatalHexLog( __FILE__ , __LINE__ , buf , buflen , "call FatalHexLog" );
WriteDebugHexLog( __FILE__ , __LINE__ , buf , buflen , "call DebugHexLog" );
WriteInfoHexLog( __FILE__ , __LINE__ , buf , buflen , "call InfoHexLog" );
WriteWarnHexLog( __FILE__ , __LINE__ , buf , buflen , "call WarnHexLog" );
WriteErrorHexLog( __FILE__ , __LINE__ , buf , buflen , "call ErrorHexLog" );
WriteFatalHexLog( __FILE__ , __LINE__ , buf , buflen , "call FatalHexLog" );

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ DIROBJS = \
#@ dir_make
#@ dir_clean
#@ dir_install
include $(MKTPLDIR)/makedir_$(MKTPLOS).inc
include $(MKTPL2_HOME)/makedir_$(MKTPL2_OS).inc

34 changes: 7 additions & 27 deletions makefile.AIX
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ���ļ���makelocal.sh�Զ�����
MAKEFILE_POSTFIX=.AIX
# ���ļ���makedir.sh�Զ�����
############################################################
# ��Ŀ�� :
Expand Down Expand Up @@ -27,16 +28,9 @@ all : make
make :
@for i in $(DIROBJS) ; do \
if [ -d "$$i" ] ; then \
if [ -f "$$i/makefile.AIX" ] ; then \
if [ -f "$$i/makefile$(MAKEFILE_POSTFIX)" ] ; then \
cd $$i ; \
make -f makefile.AIX ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
cd .. ; \
elif [ -f "$$i/makefile" ] ; then \
cd $$i ; \
make ; \
$(MAKE) -f makefile$(MAKEFILE_POSTFIX) ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
Expand All @@ -50,16 +44,9 @@ make :
clean :
@for i in $(DIROBJS) ; do \
if [ -d "$$i" ] ; then \
if [ -f "$$i/makefile.AIX" ] ; then \
if [ -f "$$i/makefile$(MAKEFILE_POSTFIX)" ] ; then \
cd $$i ; \
make -f makefile.AIX clean ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
cd .. ; \
elif [ -f "$$i/makefile" ] ; then \
cd $$i ; \
make clean ; \
$(MAKE) -f makefile$(MAKEFILE_POSTFIX) clean ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
Expand All @@ -73,16 +60,9 @@ clean :
install :
@for i in $(DIROBJS) ; do \
if [ -d "$$i" ] ; then \
if [ -f "$$i/makefile.AIX" ] ; then \
cd $$i ; \
make -f makefile.AIX install ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
cd .. ; \
elif [ -f "$$i/makefile" ] ; then \
if [ -f "$$i/makefile$(MAKEFILE_POSTFIX)" ] ; then \
cd $$i ; \
make install ; \
$(MAKE) -f makefile$(MAKEFILE_POSTFIX) install ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
Expand Down
34 changes: 7 additions & 27 deletions makefile.Linux
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ���ļ���makelocal.sh�Զ�����
MAKEFILE_POSTFIX=.Linux
# ���ļ���makedir.sh�Զ�����
############################################################
# ��Ŀ�� :
Expand Down Expand Up @@ -27,16 +28,9 @@ all : make
make :
@for i in $(DIROBJS) ; do \
if [ -d "$$i" ] ; then \
if [ -f "$$i/makefile.Linux" ] ; then \
if [ -f "$$i/makefile$(MAKEFILE_POSTFIX)" ] ; then \
$(CD) $$i ; \
make -f makefile.Linux ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
$(CD) .. ; \
elif [ -f "$$i/makefile" ] ; then \
$(CD) $$i ; \
make ; \
$(MAKE) -f makefile$(MAKEFILE_POSTFIX) ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
Expand All @@ -50,16 +44,9 @@ make :
clean :
@for i in $(DIROBJS) ; do \
if [ -d "$$i" ] ; then \
if [ -f "$$i/makefile.Linux" ] ; then \
if [ -f "$$i/makefile$(MAKEFILE_POSTFIX)" ] ; then \
$(CD) $$i ; \
make -f makefile.Linux clean ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
$(CD) .. ; \
elif [ -f "$$i/makefile" ] ; then \
$(CD) $$i ; \
make clean ; \
$(MAKE) -f makefile$(MAKEFILE_POSTFIX) clean ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
Expand All @@ -73,16 +60,9 @@ clean :
install :
@for i in $(DIROBJS) ; do \
if [ -d "$$i" ] ; then \
if [ -f "$$i/makefile.Linux" ] ; then \
$(CD) $$i ; \
make -f makefile.Linux install ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
$(CD) .. ; \
elif [ -f "$$i/makefile" ] ; then \
if [ -f "$$i/makefile$(MAKEFILE_POSTFIX)" ] ; then \
$(CD) $$i ; \
make install ; \
$(MAKE) -f makefile$(MAKEFILE_POSTFIX) install ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi ; \
Expand Down
Loading

0 comments on commit 4b9f69b

Please sign in to comment.