diff --git a/ChangeLog-CN b/ChangeLog-CN
index 9313566..06be155 100644
--- a/ChangeLog-CN
+++ b/ChangeLog-CN
@@ -1,3 +1,7 @@
+ver 1.0.6 2014-05-18 calvin
+ * 新增函数SetOpenFlag,IsLogOpened
+ * 日志文件名、配置文件名表达都支持内嵌环境变量,如"$APP_LOGDIR$/app.log"
+
ver 1.0.5 2014-05-11 calvin
* 解决BUG : 64位windows上的struct timeval.tv_sec是long long类型引起的时间问题
* 解决BUG : CreateFileA打开日志文件改使用FILE_SHARE_READ|FILE_SHARE_WRITE
diff --git a/ChangeLog-EN b/ChangeLog-EN
index de10006..435202e 100644
--- a/ChangeLog-EN
+++ b/ChangeLog-EN
@@ -1,3 +1,7 @@
+ver 1.0.6 2014-05-18 calvin
+ * add function SetOpenFlag,IsLogOpened
+ * log filename and config filename support env format string , exam : "$APP_LOGDIR$/app.log"
+
ver 1.0.5 2014-05-11 calvin
* fixed a bug on windows 64bits : change "time( & (g->cache1_tv.tv_sec) ) ;" to "g->cache1_tv.tv_sec = time( NULL ) ;"
* fxied a bug on windows : change "CreateFileA( ... , FILE_SHARE_WRITE , ... )" to "CreateFileA( ... , FILE_SHARE_READ | FILE_SHARE_WRITE , ... )" for opening log file by editor
diff --git "a/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\345\217\202\350\200\203\346\211\213\345\206\214.doc" "b/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\345\217\202\350\200\203\346\211\213\345\206\214.doc"
index f6d18eb..3e1be27 100644
Binary files "a/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\345\217\202\350\200\203\346\211\213\345\206\214.doc" and "b/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\345\217\202\350\200\203\346\211\213\345\206\214.doc" differ
diff --git "a/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\345\217\202\350\200\203\346\211\213\345\206\214.pdf" "b/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\345\217\202\350\200\203\346\211\213\345\206\214.pdf"
index 180fe75..215b9fa 100644
Binary files "a/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\345\217\202\350\200\203\346\211\213\345\206\214.pdf" and "b/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\345\217\202\350\200\203\346\211\213\345\206\214.pdf" differ
diff --git "a/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\347\224\250\346\210\267\346\214\207\345\215\227.doc" "b/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\347\224\250\346\210\267\346\214\207\345\215\227.doc"
index d26f469..3ed8eab 100644
Binary files "a/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\347\224\250\346\210\267\346\214\207\345\215\227.doc" and "b/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\347\224\250\346\210\267\346\214\207\345\215\227.doc" differ
diff --git "a/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\347\224\250\346\210\267\346\214\207\345\215\227.pdf" "b/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\347\224\250\346\210\267\346\214\207\345\215\227.pdf"
index 8bcea62..acb8e64 100644
Binary files "a/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\347\224\250\346\210\267\346\214\207\345\215\227.pdf" and "b/doc/iLOG3\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223\347\224\250\346\210\267\346\214\207\345\215\227.pdf" differ
diff --git "a/doc/\345\274\200\346\272\220\347\272\257C\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223iLOG3\345\277\253\351\200\237\345\205\245\351\227\250\357\274\210\344\270\203\343\200\201\344\270\200\344\273\275\351\205\215\347\275\256\345\272\224\347\224\250\344\272\216\345\244\232\344\270\252\346\227\245\345\277\227\346\226\207\344\273\266\357\274\211.txt" "b/doc/\345\274\200\346\272\220\347\272\257C\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223iLOG3\345\277\253\351\200\237\345\205\245\351\227\250\357\274\210\344\270\203\343\200\201\344\270\200\344\273\275\351\205\215\347\275\256\345\272\224\347\224\250\344\272\216\345\244\232\344\270\252\346\227\245\345\277\227\346\226\207\344\273\266\357\274\211.txt"
new file mode 100644
index 0000000..3f7724e
--- /dev/null
+++ "b/doc/\345\274\200\346\272\220\347\272\257C\346\227\245\345\277\227\345\207\275\346\225\260\345\272\223iLOG3\345\277\253\351\200\237\345\205\245\351\227\250\357\274\210\344\270\203\343\200\201\344\270\200\344\273\275\351\205\215\347\275\256\345\272\224\347\224\250\344\272\216\345\244\232\344\270\252\346\227\245\345\277\227\346\226\207\344\273\266\357\274\211.txt"
@@ -0,0 +1,42 @@
+开源纯C日志函数库iLOG3快速入门(七、一份配置应用于多个日志文件)
+
+有网友来信,他正在开发一个多线程模型的应用服务平台,考虑到iLOG3不错的输出性能而决定采用其作为平台日志模块,但是他的每个线程根据不同的交易码输出日志到不同的文件,用一份配置文件实现不了。于是,我连夜补充开发来满足他的需求,开源软件的成长本来就是需求和实现的快速迭代过程嘛。
+
+实现原理很简单,提供一个接口修改日志句柄内的日志文件名即可。来看一个例子
+
+配置文件如下
+log.conf
+[code]
+id hello
+output FILE $HOME$/log/parent.log
+level INFO
+styles DATETIME|LOGLEVEL|PID|TID|SOURCE|FORMAT|NEWLINE
+options CHANGE_TEST
+rotate_mode SIZE
+rotate_size 10MB
+log_bufsize 1MB 5MB
+[/code]
+
+父线程读取配置文件,创建日志句柄
+[code=c]
+CreateLogHandleFromConfigG( "log.conf" , NULL ) ;
+[/code]
+父线程写的都是$HOME$/log/parent.log
+
+接收到新交易后创建子线程处理,子线程继承父线程的日志句柄(基于线程本地存储的缺省全局日志句柄,线程之间是安全的),只需把日志文件名改掉即可,使用日志输出类型宏LOG_OUTPUT_NOSET可以直接修改日志文件名
+[code=c]
+char pathfilename[ MAXLEN_FILENAME + 1 ] ;
+memset( pathfilename , 0x00 , sizeof(pathfilename) );
+snprintf( pathfilename , sizeof(pathfilename)-1 , "$HOME$/log/child_%s.log" , transaction_code ); /* transaction_code是从报文中提取出来的交易码 */
+SetLogOutputG( LOG_OUTPUT_NOSET , pathfilename , LOG_NO_OUTPUTFUNC ); /* 直接修改日志句柄内的日志文件名,如果文件已打开,会先关闭之 */
+[/code]
+子线程写的都是$HOME$/log/child_(交易码).log
+
+简单几条语句,就能使多线程或多进程读取一份配置文件或者说继承一个日志句柄,根据需要输出不同的日志文件,而不需要编写多份配置文件或避免重复创建日志句柄而带来的低效性能。
+
+采用直接调用函数、非配置文件方式使用日志句柄的实现以上主题方法类似。
+
+日志函数库iLOG3优美易读的结构框架、灵活的使用方法、出众的定制扩展能力以及不错的输出性能正在被越来越多的人使用,我在这里感谢大家的信任 ^_^
+是不是越看越心动了?那就赶紧下载来玩玩吧
+首页传送门 : [url]http://git.oschina.net/calvinwilliams/iLOG3[/url]
+源代码包doc目录中包含了用户指南和参考手册,里面有更详尽的说明
diff --git a/src/LOG.c b/src/LOG.c
index fcce07f..b7c210c 100644
--- a/src/LOG.c
+++ b/src/LOG.c
@@ -1,10 +1,10 @@
/*
* iLOG3 - 标准c日志函数库 日志句柄
* author : calvin
- * email : calvinwilliams.c@gmail.com
- * LastVersion : v1.0.5
- *
- * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
+ * email : calvinwilliams.c@gmail.com
+ * LastVersion : v1.0.6
+ *
+ * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
*/
#if ( defined _WIN32 )
@@ -23,7 +23,7 @@
static char sg_aszLogLevelDesc[][5+1] = { "DEBUG" , "INFO" , "WARN" , "ERROR" , "FATAL" , "NOLOG" } ;
/* 版本标识 */
-_WINDLL_FUNC int _LOG_VERSION_1_0_5 = 0 ;
+_WINDLL_FUNC int _LOG_VERSION_1_0_6 = 0 ;
/* 线程本地存储全局对象 */
#if ( defined _WIN32 )
@@ -279,6 +279,8 @@ static int OpenLog_OpenFile( LOG *g , char *log_pathfilename , void **open_handl
{
long l ;
+ if( log_pathfilename[0] == '\0' )
+ return 0;
if( g->open_flag == 1 )
return 0;
@@ -299,6 +301,9 @@ static int WriteLog_WriteFile( LOG *g , void **open_handle , int log_level , cha
{
BOOL bret ;
+ if( g->open_flag == 0 )
+ return -1;
+
SetFilePointer( g->hFile , 0 , NULL , FILE_END );
bret = WriteFile( g->hFile , buf , len , writelen , NULL ) ;
if( bret != TRUE )
@@ -320,6 +325,8 @@ static int CloseLog_CloseHandle( LOG *g , void **open_handle )
static int OpenLog_RegisterEventSource( LOG *g , char *log_pathfilename , void **open_handle )
{
+ if( log_pathfilename[0] == '\0' )
+ return 0;
if( g->open_flag == 1 )
return 0;
@@ -336,6 +343,9 @@ static int WriteLog_ReportEvent( LOG *g , void **open_handle , int log_level , c
unsigned short event_log_level ;
char *ptr = NULL ;
+ if( g->open_flag == 0 )
+ return -1;
+
if( log_level == LOG_LEVEL_DEBUG )
event_log_level = EVENTLOG_INFORMATION_TYPE ;
else if( log_level == LOG_LEVEL_INFO )
@@ -369,6 +379,8 @@ static long CloseLog_DeregisterEventSource( LOG *g , void **open_handle )
static int OpenLog_open( LOG *g , char *log_pathfilename , void **open_handle )
{
+ if( log_pathfilename[0] == '\0' )
+ return 0;
if( g->open_flag == 1 )
return 0;
@@ -393,6 +405,8 @@ static int CloseLog_close( LOG *g , void **open_handle )
static int OpenLog_openlog( LOG *g , char *log_pathfilename , void **open_handle )
{
+ if( log_pathfilename[0] == '\0' )
+ return 0;
if( g->open_flag == 1 )
return 0;
@@ -406,6 +420,9 @@ static int WriteLog_syslog( LOG *g , void **open_handle , int log_level , char *
{
int syslog_log_level ;
+ if( g->open_flag == 0 )
+ return -1;
+
if( log_level == LOG_LEVEL_DEBUG )
syslog_log_level = LOG_DEBUG ;
else if( log_level == LOG_LEVEL_INFO )
@@ -439,6 +456,9 @@ static int CloseLog_closelog( LOG *g , void **open_handle )
static int WriteLog_write( LOG *g , void **open_handle , int log_level , char *buf , long len , long *writelen )
{
+ if( g->open_flag == 0 )
+ return -1;
+
(*writelen) = WRITE( g->fd , buf , len ) ;
if( (*writelen) == -1 )
return LOG_RETURN_ERROR_WRITEFILE;
@@ -467,17 +487,51 @@ static int ChangeTest_interval( LOG *g , void **test_handle )
return 0;
}
-/* 设置日志输出 */
-int SetLogOutput( LOG *g , int output , char *log_pathfilename , funcOpenLog *pfuncOpenLogFirst , funcOpenLog *pfuncOpenLog , funcWriteLog *pfuncWriteLog , funcChangeTest *pfuncChangeTest , funcCloseLog *pfuncCloseLog , funcCloseLog *pfuncCloseLogFinally )
+int ExpandPathFilename( char *pathfilename , long pathfilename_bufsize )
{
- char pathfilename[ MAXLEN_FILENAME + 1 ] ;
long pathfilename_len ;
+ char *p1 = NULL , *p2 = NULL ;
char env_key[ MAXLEN_FILENAME + 1 ] ;
long env_key_len ;
char *env_val = NULL ;
long env_val_len ;
- char *p1 = NULL , *p2 = NULL ;
+
+ pathfilename_len = strlen(pathfilename) ;
+
+ p1 = strchr( pathfilename , '$' );
+ while( p1 )
+ {
+ /* 展开环境变量 */
+ p2 = strchr( p1 + 1 , '$' ) ;
+ if( p2 == NULL )
+ return LOG_RETURN_ERROR_PARAMETER;
+
+ memset( env_key , 0x00 , sizeof(env_key) );
+ env_key_len = p2 - p1 + 1 ;
+ strncpy( env_key , p1 + 1 , env_key_len - 2 );
+ env_val = getenv( env_key ) ;
+ if( env_val == NULL )
+ return LOG_RETURN_ERROR_PARAMETER;
+
+ env_val_len = strlen(env_val) ;
+ if( pathfilename_len + ( env_val_len - env_key_len ) > pathfilename_bufsize-1 )
+ return LOG_RETURN_ERROR_PARAMETER;
+
+ memmove( p2+1 + ( env_val_len - env_key_len ) , p2+1 , strlen(p2+1) + 1 );
+ memcpy( p1 , env_val , env_val_len );
+ pathfilename_len += env_val_len - env_key_len ;
+
+ p1 = strchr( p1 + ( env_val_len - env_key_len ) , '$' );
+ }
+
+ return 0;
+}
+
+/* 设置日志输出 */
+int SetLogOutput( LOG *g , int output , char *log_pathfilename , funcOpenLog *pfuncOpenLogFirst , funcOpenLog *pfuncOpenLog , funcWriteLog *pfuncWriteLog , funcChangeTest *pfuncChangeTest , funcCloseLog *pfuncCloseLog , funcCloseLog *pfuncCloseLogFinally )
+{
+ char pathfilename[ MAXLEN_FILENAME + 1 ] ;
int nret = 0 ;
@@ -494,33 +548,9 @@ int SetLogOutput( LOG *g , int output , char *log_pathfilename , funcOpenLog *pf
if( output != LOG_OUTPUT_CALLBACK )
{
- pathfilename_len = strlen(pathfilename) ;
-
- p1 = strchr( pathfilename , '$' );
- while( p1 )
- {
- /* 展开环境变量 */
- p2 = strchr( p1 + 1 , '$' ) ;
- if( p2 == NULL )
- return LOG_RETURN_ERROR_PARAMETER;
-
- memset( env_key , 0x00 , sizeof(env_key) );
- env_key_len = p2 - p1 + 1 ;
- strncpy( env_key , p1 + 1 , env_key_len - 2 );
- env_val = getenv( env_key ) ;
- if( env_val == NULL )
- return LOG_RETURN_ERROR_PARAMETER;
-
- env_val_len = strlen(env_val) ;
- if( pathfilename_len + ( env_val_len - env_key_len ) > sizeof(pathfilename)-1 )
- return LOG_RETURN_ERROR_PARAMETER;
-
- memmove( p2+1 + ( env_val_len - env_key_len ) , p2+1 , strlen(p2+1) + 1 );
- memcpy( p1 , env_val , env_val_len );
- pathfilename_len += env_val_len - env_key_len ;
-
- p1 = strchr( p1 + ( env_val_len - env_key_len ) , '$' );
- }
+ nret = ExpandPathFilename( pathfilename , sizeof(pathfilename) ) ;
+ if( nret )
+ return nret;
}
}
@@ -558,7 +588,6 @@ int SetLogOutput( LOG *g , int output , char *log_pathfilename , funcOpenLog *pf
if( g->pfuncCloseLogFinally )
{
nret = g->pfuncCloseLogFinally( g , & (g->open_handle) ) ;
- g->open_flag = 0 ;
}
}
}
@@ -573,110 +602,113 @@ int SetLogOutput( LOG *g , int output , char *log_pathfilename , funcOpenLog *pf
memset( g->log_pathfilename , 0x00 , sizeof(g->log_pathfilename) );
strncpy( g->log_pathfilename , pathfilename , sizeof(g->log_pathfilename)-1 );
- g->output = output ;
- if( g->output == LOG_OUTPUT_STDOUT )
+ if( output != LOG_OUTPUT_NOSET )
{
- g->fd = STDOUT_HANDLE ;
- g->pfuncOpenLogFirst = NULL ;
- g->pfuncOpenLog = NULL ;
- g->pfuncWriteLog = & WriteLog_write ;
- g->pfuncChangeTest = NULL ;
- g->pfuncCloseLog = NULL ;
- g->pfuncCloseLogFinally = NULL ;
-
- g->log_options &= ~LOG_OPTION_OPEN_AND_CLOSE ;
- g->log_options &= ~LOG_OPTION_CHANGE_TEST ;
- g->log_options |= LOG_OPTION_OPEN_ONCE ;
-
- g->open_flag = 1 ;
- }
- else if( output == LOG_OUTPUT_STDERR )
- {
- g->fd = STDERR_HANDLE ;
- g->pfuncOpenLogFirst = NULL ;
- g->pfuncOpenLog = NULL ;
- g->pfuncWriteLog = & WriteLog_write ;
- g->pfuncChangeTest = NULL ;
- g->pfuncCloseLog = NULL ;
- g->pfuncCloseLogFinally = NULL ;
-
- g->log_options &= ~LOG_OPTION_OPEN_AND_CLOSE ;
- g->log_options &= ~LOG_OPTION_CHANGE_TEST ;
- g->log_options |= LOG_OPTION_OPEN_ONCE ;
-
- g->open_flag = 1 ;
- }
- else if( output == LOG_OUTPUT_SYSLOG )
- {
-#if ( defined _WIN32 )
- g->pfuncOpenLogFirst = & OpenLog_RegisterEventSource ;
- g->pfuncOpenLog = NULL ;
- g->pfuncWriteLog = & WriteLog_ReportEvent ;
- g->pfuncChangeTest = NULL ;
- g->pfuncCloseLog = NULL ;
- g->pfuncCloseLogFinally = & CloseLog_DeregisterEventSource ;
-#elif ( defined __unix ) || ( defined __linux__ )
- g->pfuncOpenLogFirst = & OpenLog_openlog ;
- g->pfuncOpenLog = NULL ;
- g->pfuncWriteLog = & WriteLog_syslog ;
- g->pfuncChangeTest = NULL ;
- g->pfuncCloseLog = NULL ;
- g->pfuncCloseLogFinally = & CloseLog_closelog ;
-#endif
-
- g->log_options &= ~LOG_OPTION_OPEN_AND_CLOSE ;
- g->log_options &= ~LOG_OPTION_CHANGE_TEST ;
- g->log_options |= LOG_OPTION_OPEN_ONCE ;
-
- g->open_flag = 0 ;
- }
- else if( output == LOG_OUTPUT_FILE )
- {
-#if ( defined _WIN32 )
- if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_ONCE ) || TEST_ATTRIBUTE( g->log_options , LOG_OPTION_CHANGE_TEST ) )
+ g->output = output ;
+ if( g->output == LOG_OUTPUT_STDOUT )
{
- g->pfuncOpenLogFirst = & OpenLog_OpenFile ;
+ g->fd = STDOUT_HANDLE ;
+ g->pfuncOpenLogFirst = NULL ;
g->pfuncOpenLog = NULL ;
- g->pfuncWriteLog = & WriteLog_WriteFile ;
- g->pfuncChangeTest = & ChangeTest_interval ;
+ g->pfuncWriteLog = & WriteLog_write ;
+ g->pfuncChangeTest = NULL ;
g->pfuncCloseLog = NULL ;
- g->pfuncCloseLogFinally = & CloseLog_CloseHandle ;
+ g->pfuncCloseLogFinally = NULL ;
+
+ g->log_options &= ~LOG_OPTION_OPEN_AND_CLOSE ;
+ g->log_options &= ~LOG_OPTION_CHANGE_TEST ;
+ g->log_options |= LOG_OPTION_OPEN_ONCE ;
+
+ g->open_flag = 1 ;
}
- else
+ else if( output == LOG_OUTPUT_STDERR )
{
+ g->fd = STDERR_HANDLE ;
g->pfuncOpenLogFirst = NULL ;
- g->pfuncOpenLog = & OpenLog_OpenFile ;
- g->pfuncWriteLog = & WriteLog_WriteFile ;
+ g->pfuncOpenLog = NULL ;
+ g->pfuncWriteLog = & WriteLog_write ;
g->pfuncChangeTest = NULL ;
- g->pfuncCloseLog = & CloseLog_CloseHandle ;
+ g->pfuncCloseLog = NULL ;
g->pfuncCloseLogFinally = NULL ;
+
+ g->log_options &= ~LOG_OPTION_OPEN_AND_CLOSE ;
+ g->log_options &= ~LOG_OPTION_CHANGE_TEST ;
+ g->log_options |= LOG_OPTION_OPEN_ONCE ;
+
+ g->open_flag = 1 ;
}
-#elif ( defined __unix ) || ( defined __linux__ )
- if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_ONCE ) || TEST_ATTRIBUTE( g->log_options , LOG_OPTION_CHANGE_TEST ) )
+ else if( output == LOG_OUTPUT_SYSLOG )
{
- g->pfuncOpenLogFirst = & OpenLog_open ;
+#if ( defined _WIN32 )
+ g->pfuncOpenLogFirst = & OpenLog_RegisterEventSource ;
g->pfuncOpenLog = NULL ;
- g->pfuncWriteLog = & WriteLog_write ;
- g->pfuncChangeTest = & ChangeTest_interval ;
+ g->pfuncWriteLog = & WriteLog_ReportEvent ;
+ g->pfuncChangeTest = NULL ;
g->pfuncCloseLog = NULL ;
- g->pfuncCloseLogFinally = & CloseLog_close ;
- }
- else
- {
- g->pfuncOpenLogFirst = NULL ;
- g->pfuncOpenLog = & OpenLog_open ;
- g->pfuncWriteLog = & WriteLog_write ;
+ g->pfuncCloseLogFinally = & CloseLog_DeregisterEventSource ;
+#elif ( defined __unix ) || ( defined __linux__ )
+ g->pfuncOpenLogFirst = & OpenLog_openlog ;
+ g->pfuncOpenLog = NULL ;
+ g->pfuncWriteLog = & WriteLog_syslog ;
g->pfuncChangeTest = NULL ;
- g->pfuncCloseLog = & CloseLog_close ;
- g->pfuncCloseLogFinally = NULL ;
+ g->pfuncCloseLog = NULL ;
+ g->pfuncCloseLogFinally = & CloseLog_closelog ;
+#endif
+
+ g->log_options &= ~LOG_OPTION_OPEN_AND_CLOSE ;
+ g->log_options &= ~LOG_OPTION_CHANGE_TEST ;
+ g->log_options |= LOG_OPTION_OPEN_ONCE ;
+
+ g->open_flag = 0 ;
}
+ else if( output == LOG_OUTPUT_FILE )
+ {
+#if ( defined _WIN32 )
+ if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_ONCE ) || TEST_ATTRIBUTE( g->log_options , LOG_OPTION_CHANGE_TEST ) )
+ {
+ g->pfuncOpenLogFirst = & OpenLog_OpenFile ;
+ g->pfuncOpenLog = NULL ;
+ g->pfuncWriteLog = & WriteLog_WriteFile ;
+ g->pfuncChangeTest = & ChangeTest_interval ;
+ g->pfuncCloseLog = NULL ;
+ g->pfuncCloseLogFinally = & CloseLog_CloseHandle ;
+ }
+ else
+ {
+ g->pfuncOpenLogFirst = NULL ;
+ g->pfuncOpenLog = & OpenLog_OpenFile ;
+ g->pfuncWriteLog = & WriteLog_WriteFile ;
+ g->pfuncChangeTest = NULL ;
+ g->pfuncCloseLog = & CloseLog_CloseHandle ;
+ g->pfuncCloseLogFinally = NULL ;
+ }
+#elif ( defined __unix ) || ( defined __linux__ )
+ if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_ONCE ) || TEST_ATTRIBUTE( g->log_options , LOG_OPTION_CHANGE_TEST ) )
+ {
+ g->pfuncOpenLogFirst = & OpenLog_open ;
+ g->pfuncOpenLog = NULL ;
+ g->pfuncWriteLog = & WriteLog_write ;
+ g->pfuncChangeTest = & ChangeTest_interval ;
+ g->pfuncCloseLog = NULL ;
+ g->pfuncCloseLogFinally = & CloseLog_close ;
+ }
+ else
+ {
+ g->pfuncOpenLogFirst = NULL ;
+ g->pfuncOpenLog = & OpenLog_open ;
+ g->pfuncWriteLog = & WriteLog_write ;
+ g->pfuncChangeTest = NULL ;
+ g->pfuncCloseLog = & CloseLog_close ;
+ g->pfuncCloseLogFinally = NULL ;
+ }
#endif
- g->open_flag = 0 ;
- }
- else if( output == LOG_OUTPUT_CALLBACK )
- {
- SetLogOutputFuncDirectly( g , pfuncOpenLogFirst , pfuncOpenLog , pfuncWriteLog , pfuncChangeTest , pfuncCloseLog , pfuncCloseLogFinally );
- g->open_flag = 0 ;
+ g->open_flag = 0 ;
+ }
+ else if( output == LOG_OUTPUT_CALLBACK )
+ {
+ SetLogOutputFuncDirectly( g , pfuncOpenLogFirst , pfuncOpenLog , pfuncWriteLog , pfuncChangeTest , pfuncCloseLog , pfuncCloseLogFinally );
+ g->open_flag = 0 ;
+ }
}
if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_ONCE ) || TEST_ATTRIBUTE( g->log_options , LOG_OPTION_CHANGE_TEST ) )
@@ -686,7 +718,6 @@ int SetLogOutput( LOG *g , int output , char *log_pathfilename , funcOpenLog *pf
nret = g->pfuncOpenLogFirst( g , g->log_pathfilename , & (g->open_handle) ) ;
if( nret )
return nret;
- g->open_flag = 1 ;
}
}
@@ -1247,12 +1278,12 @@ int WriteLogBase( LOG *g , char *c_filename , long c_fileline , int log_level ,
{
if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_CHANGE_TEST ) || TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_ONCE ) )
{
+ /* 打开日志文件 */
if( g->pfuncOpenLogFirst )
{
nret = g->pfuncOpenLogFirst( g , g->log_pathfilename , & (g->open_handle) ) ;
if( nret )
return nret;
- g->open_flag = 1 ;
}
}
else if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_AND_CLOSE ) )
@@ -1263,7 +1294,6 @@ int WriteLogBase( LOG *g , char *c_filename , long c_fileline , int log_level ,
nret = g->pfuncOpenLog( g , g->log_pathfilename , & (g->open_handle) ) ;
if( nret )
return nret;
- g->open_flag = 1 ;
}
}
}
@@ -1283,6 +1313,7 @@ int WriteLogBase( LOG *g , char *c_filename , long c_fileline , int log_level ,
{
if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_CHANGE_TEST ) )
{
+ /* 测试日志文件 */
if( g->pfuncChangeTest )
{
nret = g->pfuncChangeTest( g , & (g->test_handle) ) ;
@@ -1298,7 +1329,6 @@ int WriteLogBase( LOG *g , char *c_filename , long c_fileline , int log_level ,
nret = g->pfuncCloseLog( g , & (g->open_handle) ) ;
if( nret )
return nret;
- g->open_flag = 0 ;
}
}
}
@@ -1539,12 +1569,12 @@ int WriteHexLogBase( LOG *g , char *c_filename , long c_fileline , int log_level
{
if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_CHANGE_TEST ) || TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_ONCE ) )
{
+ /* 打开日志文件 */
if( g->pfuncOpenLogFirst )
{
nret = g->pfuncOpenLogFirst( g , g->log_pathfilename , & (g->open_handle) ) ;
if( nret )
return nret;
- g->open_flag = 1 ;
}
}
else if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_AND_CLOSE ) )
@@ -1555,7 +1585,6 @@ int WriteHexLogBase( LOG *g , char *c_filename , long c_fileline , int log_level
nret = g->pfuncOpenLog( g , g->log_pathfilename , & (g->open_handle) ) ;
if( nret )
return nret;
- g->open_flag = 1 ;
}
}
}
@@ -1575,6 +1604,7 @@ int WriteHexLogBase( LOG *g , char *c_filename , long c_fileline , int log_level
{
if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_CHANGE_TEST ) )
{
+ /* 测试日志文件 */
if( g->pfuncChangeTest )
{
nret = g->pfuncChangeTest( g , & (g->test_handle) ) ;
@@ -1582,9 +1612,11 @@ int WriteHexLogBase( LOG *g , char *c_filename , long c_fileline , int log_level
return nret;
}
}
+ /*
else if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_ONCE ) )
{
}
+ */
else if( TEST_ATTRIBUTE( g->log_options , LOG_OPTION_OPEN_AND_CLOSE ) )
{
/* 关闭日志文件 */
@@ -1593,7 +1625,6 @@ int WriteHexLogBase( LOG *g , char *c_filename , long c_fileline , int log_level
nret = g->pfuncCloseLog( g , & (g->open_handle) ) ;
if( nret )
return nret;
- g->open_flag = 0 ;
}
}
@@ -1982,6 +2013,17 @@ void SetGlobalLOG( LOG *g )
}
#endif
+int SetOpenFlag( LOG *g , char open_flag )
+{
+ g->open_flag = open_flag ;
+ return 0;
+}
+
+char IsLogOpened( LOG *g )
+{
+ return g->open_flag ;
+}
+
int GetLogLevel( LOG *g )
{
return g->log_level;
diff --git a/src/LOG.h b/src/LOG.h
index c8ee6e4..22bd3be 100644
--- a/src/LOG.h
+++ b/src/LOG.h
@@ -3,11 +3,11 @@
/*
* iLOG3 - 标准c日志函数库 日志句柄
- * author : calvin
- * email : calvinwilliams.c@gmail.com
- * LastVersion : v1.0.5
- *
- * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
+ * author : calvin
+ * email : calvinwilliams.c@gmail.com
+ * LastVersion : v1.0.6
+ *
+ * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
*/
#ifdef __cplusplus
@@ -66,6 +66,7 @@ struct tm *localtime_r(const time_t *timep, struct tm *result);
/********************************************************/
/* 日志输出类型 */
+#define LOG_OUTPUT_NOSET -1 /* 不设置 */
#define LOG_OUTPUT_STDOUT 1 /* 标准输出 */
#define LOG_OUTPUT_STDERR 2 /* 标准错误输出 */
#define LOG_OUTPUT_SYSLOG 3 /* UNIX&Linux的syslog 或 Windows的WINDOWS EVENT */
@@ -393,6 +394,9 @@ _WINDLL_FUNC void SetGlobalLOG( LOG *g );
(_logbuf_)->buf_remain_len -= _offset_len_ ; \
}
+_WINDLL_FUNC int SetOpenFlag( LOG *g , char open_flag );
+_WINDLL_FUNC char IsLogOpened( LOG *g );
+
_WINDLL_FUNC int GetLogLevel( LOG *g );
_WINDLL_FUNC LOGBUF *GetLogBuffer( LOG *g );
diff --git a/src/LOGCONF.c b/src/LOGCONF.c
index 618eedd..67050d8 100644
--- a/src/LOGCONF.c
+++ b/src/LOGCONF.c
@@ -1,10 +1,10 @@
/*
* iLOG3 - 标准c日志函数库 日志句柄简单配置文件接口
- * author : calvin
- * email : calvinwilliams.c@gmail.com
- * LastVersion : v1.0.5
- *
- * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
+ * author : calvin
+ * email : calvinwilliams.c@gmail.com
+ * LastVersion : v1.0.6
+ *
+ * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
*/
#if ( defined _WIN32 )
@@ -99,6 +99,9 @@ _WINDLL_FUNC LOG *ReadLogHandleFromConfig( FILE *fp , char *id )
if( nret )
goto ERR;
+ if( strcmp( value2 , "\"\"" ) == 0 )
+ strcpy( value2 , "" );
+
nret = SetLogOutput( g , output , value2 , LOG_NO_OUTPUTFUNC ) ;
if( nret )
goto ERR;
@@ -253,12 +256,16 @@ ERR :
return NULL;
}
+extern int ExpandPathFilename( char *pathfilename , long pathfilename_bufsize );
+
LOG *CreateLogHandleFromConfig( char *config_filename , char *postfix )
{
char config_pathfilename[ MAXLEN_FILENAME + 1 ] ;
FILE *fp = NULL ;
LOG *g = NULL ;
+ int nret ;
+
if( postfix )
{
memset( config_pathfilename , 0x00 , sizeof(config_pathfilename) );
@@ -270,6 +277,10 @@ LOG *CreateLogHandleFromConfig( char *config_filename , char *postfix )
SNPRINTF( config_pathfilename , sizeof(config_pathfilename)-1 , "%s" , config_filename );
}
+ nret = ExpandPathFilename( config_pathfilename , sizeof(config_pathfilename) ) ;
+ if( nret )
+ return NULL;
+
fp = fopen( config_pathfilename , "r" ) ;
if( fp == NULL )
return NULL;
diff --git a/src/LOGCONF.h b/src/LOGCONF.h
index 7c495b2..75f7f59 100644
--- a/src/LOGCONF.h
+++ b/src/LOGCONF.h
@@ -3,11 +3,11 @@
/*
* iLOG3 - 标准c日志函数库 日志句柄简单配置文件接口
- * author : calvin
- * email : calvinwilliams.c@gmail.com
- * LastVersion : v1.0.5
- *
- * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
+ * author : calvin
+ * email : calvinwilliams.c@gmail.com
+ * LastVersion : v1.0.6
+ *
+ * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
*/
#ifdef __cplusplus
diff --git a/src/LOGS.c b/src/LOGS.c
index dcbb0bb..0b4802e 100644
--- a/src/LOGS.c
+++ b/src/LOGS.c
@@ -1,10 +1,10 @@
/*
* iLOG3 - 标准c日志函数库 日志句柄集合
- * author : calvin
- * email : calvinwilliams.c@gmail.com
- * LastVersion : v1.0.5
- *
- * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
+ * author : calvin
+ * email : calvinwilliams.c@gmail.com
+ * LastVersion : v1.0.6
+ *
+ * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
*/
#if ( defined _WIN32 )
diff --git a/src/LOGS.h b/src/LOGS.h
index 549e84e..f39c69c 100644
--- a/src/LOGS.h
+++ b/src/LOGS.h
@@ -3,11 +3,11 @@
/*
* iLOG3 - 标准c日志函数库 日志句柄集合
- * author : calvin
- * email : calvinwilliams.c@gmail.com
- * LastVersion : v1.0.5
- *
- * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
+ * author : calvin
+ * email : calvinwilliams.c@gmail.com
+ * LastVersion : v1.0.6
+ *
+ * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
*/
#ifdef __cplusplus
diff --git a/src/LOGSCONF.c b/src/LOGSCONF.c
index fef60a8..e5b0270 100644
--- a/src/LOGSCONF.c
+++ b/src/LOGSCONF.c
@@ -1,10 +1,10 @@
/*
* iLOG3 - 标准c日志函数库 日志句柄集合简单配置文件接口
- * author : calvin
- * email : calvinwilliams.c@gmail.com
- * LastVersion : v1.0.5
- *
- * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
+ * author : calvin
+ * email : calvinwilliams.c@gmail.com
+ * LastVersion : v1.0.6
+ *
+ * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
*/
#if ( defined _WIN32 )
@@ -54,13 +54,17 @@ _WINDLL_FUNC LOGS *ReadLogsHandleFromConfig( FILE *fp )
return gs;
}
-
+
+extern int ExpandPathFilename( char *pathfilename , long pathfilename_bufsize );
+
LOGS *CreateLogsHandleFromConfig( char *config_filename , char *postfix )
{
char config_pathfilename[ MAXLEN_FILENAME + 1 ] ;
FILE *fp = NULL ;
LOGS *gs = NULL ;
+ int nret ;
+
if( postfix )
{
memset( config_pathfilename , 0x00 , sizeof(config_pathfilename) );
@@ -72,6 +76,10 @@ LOGS *CreateLogsHandleFromConfig( char *config_filename , char *postfix )
SNPRINTF( config_pathfilename , sizeof(config_pathfilename)-1 , "%s" , config_filename );
}
+ nret = ExpandPathFilename( config_pathfilename , sizeof(config_pathfilename) ) ;
+ if( nret )
+ return NULL;
+
fp = fopen( config_pathfilename , "r" ) ;
if( fp == NULL )
return NULL;
diff --git a/src/LOGSCONF.h b/src/LOGSCONF.h
index d6204be..5d5bd6b 100644
--- a/src/LOGSCONF.h
+++ b/src/LOGSCONF.h
@@ -3,11 +3,11 @@
/*
* iLOG3 - 标准c日志函数库 日志句柄集合简单配置文件接口
- * author : calvin
- * email : calvinwilliams.c@gmail.com
- * LastVersion : v1.0.5
- *
- * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
+ * author : calvin
+ * email : calvinwilliams.c@gmail.com
+ * LastVersion : v1.0.6
+ *
+ * Licensed under the LGPL v2.1, see the file LICENSE in base directory.
*/
#ifdef __cplusplus
diff --git a/src/vc6/iLOG3/iLOG3.plg b/src/vc6/iLOG3/iLOG3.plg
index b9a0278..c69e183 100644
--- a/src/vc6/iLOG3/iLOG3.plg
+++ b/src/vc6/iLOG3/iLOG3.plg
@@ -6,7 +6,7 @@
--------------------Configuration: iLOG3 - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP346.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP13C.tmp" with contents
[
/nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILOG3_EXPORTS" /D "LOG_GLOBAL_ENV" /Fp"Debug/iLOG3.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"D:\Work\C Projects\iLOG3-1.0.5\src\LOG.c"
@@ -14,8 +14,8 @@ Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP346.tmp" with conte
"D:\Work\C Projects\iLOG3-1.0.5\src\LOGS.c"
"D:\Work\C Projects\iLOG3-1.0.5\src\LOGSCONF.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP346.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP347.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP13C.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP13D.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/iLOG3.pdb" /debug /machine:I386 /out:"Debug/iLOG3.dll" /implib:"Debug/iLOG3.lib" /pdbtype:sept
".\Debug\LOG.obj"
@@ -23,7 +23,7 @@ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32
".\Debug\LOGS.obj"
".\Debug\LOGSCONF.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP347.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP13D.tmp"
Output Window
Compiling...
LOG.c
@@ -32,7 +32,7 @@ LOGS.c
LOGSCONF.c
Linking...
Creating library Debug/iLOG3.lib and object Debug/iLOG3.exp
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP34B.bat" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP141.bat" with contents
[
@echo off
mkdir "%ProgramFiles%\iLOG3"
@@ -43,7 +43,7 @@ copy Debug\*.dll "%ProgramFiles%\iLOG3\bin\" /Y
mkdir "%ProgramFiles%\iLOG3\lib"
copy Debug\*.lib "%ProgramFiles%\iLOG3\lib\" /Y
]
-Creating command line "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP34B.bat"
+Creating command line "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP141.bat"
子目录或文件 C:\Program Files\iLOG3 已经存在。
子目录或文件 C:\Program Files\iLOG3\include 已经存在。
@@ -67,7 +67,7 @@ iLOG3.dll - 0 error(s), 0 warning(s)
--------------------Configuration: iLOG3_a - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP34C.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP142.tmp" with contents
[
/nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "LOG_GLOBAL_ENV" /Fp"Debug/iLOG3_a.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"D:\Work\C Projects\iLOG3-1.0.5\src\LOG.c"
@@ -75,7 +75,7 @@ Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP34C.tmp" with conte
"D:\Work\C Projects\iLOG3-1.0.5\src\LOGS.c"
"D:\Work\C Projects\iLOG3-1.0.5\src\LOGSCONF.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP34C.tmp"
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP142.tmp"
Creating command line "link.exe -lib /nologo /out:"Debug\iLOG3_a.lib" ".\Debug\LOG.obj" ".\Debug\LOGCONF.obj" ".\Debug\LOGS.obj" ".\Debug\LOGSCONF.obj" "
Output Window
Compiling...
@@ -84,7 +84,7 @@ LOGCONF.c
LOGS.c
LOGSCONF.c
Creating library...
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP34D.bat" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP143.bat" with contents
[
@echo off
mkdir "%ProgramFiles%\iLOG3"
@@ -93,7 +93,7 @@ copy ..\..\..\src\*.h "%ProgramFiles%\iLOG3\include\" /Y
mkdir "%ProgramFiles%\iLOG3\lib"
copy Debug\*.lib "%ProgramFiles%\iLOG3\lib\" /Y
]
-Creating command line "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP34D.bat"
+Creating command line "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP143.bat"
子目录或文件 C:\Program Files\iLOG3 已经存在。
子目录或文件 C:\Program Files\iLOG3\include 已经存在。
diff --git a/src/vc6/vc6.ncb b/src/vc6/vc6.ncb
index 56cf1e5..d191121 100644
Binary files a/src/vc6/vc6.ncb and b/src/vc6/vc6.ncb differ
diff --git a/src/vc6/vc6.opt b/src/vc6/vc6.opt
index 8a7b624..50dd411 100644
Binary files a/src/vc6/vc6.opt and b/src/vc6/vc6.opt differ
diff --git a/test/makefile b/test/makefile
index 2836e62..087723a 100644
--- a/test/makefile
+++ b/test/makefile
@@ -77,7 +77,7 @@ test_funny : test_funny.o
$(CC) -o $@ test_funny.o $(LFLAGS)
test_logconf : test_logconf.o
- $(CC) -o $@ test_funny.o $(LFLAGS)
+ $(CC) -o $@ test_logconf.o $(LFLAGS)
test_logsconf : test_logsconf.o
$(CC) -o $@ test_logsconf.o $(LFLAGS)
diff --git a/test/test_logconf.c b/test/test_logconf.c
index bf1ddc2..642348d 100644
--- a/test/test_logconf.c
+++ b/test/test_logconf.c
@@ -6,13 +6,17 @@ int test_logconf()
char buffer[ 64 + 1 ] = "" ;
long buflen = sizeof(buffer) - 1 ;
- g = CreateLogHandleFromConfig( "test_logconf.conf" , NULL ) ;
+ g = CreateLogHandleFromConfig( "$HOME$/etc/test_logconf.conf" , NULL ) ;
if( g == NULL )
{
printf( "从配置文件构建日志句柄失败\n" );
return -1;
}
+ /*
+ SetLogOutput( g , LOG_OUTPUT_NOSET , "$HOME$/log/test_logconf_1.log" , LOG_NO_OUTPUTFUNC );
+ */
+
printf( "创建日志句柄成功\n" );
DebugLog( g , __FILE__ , __LINE__ , "hello LOGCONF" );
diff --git a/test/test_logconf.conf b/test/test_logconf.conf.bak
similarity index 91%
rename from test/test_logconf.conf
rename to test/test_logconf.conf.bak
index 3bf72cf..7ff3ce6 100644
--- a/test/test_logconf.conf
+++ b/test/test_logconf.conf.bak
@@ -1,5 +1,6 @@
id hello
-output FILE test_logconf.log
+output FILE test_logconf.log
+#output FILE ""
level INFO
styles DATETIME|LOGLEVEL|PID|TID|SOURCE|FORMAT|NEWLINE
options CHANGE_TEST
diff --git a/test/test_outputfunc.c b/test/test_outputfunc.c
index 73784d2..1e40dcd 100644
--- a/test/test_outputfunc.c
+++ b/test/test_outputfunc.c
@@ -8,7 +8,11 @@
funcOpenLog MyOpenLogFirst ;
int MyOpenLogFirst( LOG *g , char *log_pathfilename , void **open_handle )
{
+ if( IsLogOpened( g ) == 1 )
+ return 0;
+
printf( "MyOpenLogFirst[%s]\n" , log_pathfilename );
+ SetOpenFlag( g , 1 );
return 0;
}
@@ -16,7 +20,10 @@ funcWriteLog MyWriteLog ;
int MyWriteLog( LOG *g , void **open_handle , int log_level , char *buf , long len , long *writelen )
{
char *p_log_level_desc = NULL ;
-
+
+ if( IsLogOpened( g ) == 0 )
+ return 0;
+
ConvertLogLevel_itoa( log_level , & p_log_level_desc );
(*writelen) = printf( "MyWriteLog[%s][%ld][%s]\n" , p_log_level_desc , len , buf ) ;
@@ -26,7 +33,11 @@ int MyWriteLog( LOG *g , void **open_handle , int log_level , char *buf , long l
funcCloseLog MyCloseLogFinally ;
int MyCloseLogFinally( LOG *g , void **open_handle )
{
+ if( IsLogOpened( g ) == 0 )
+ return 0;
+
printf( "MyCloseLogFinally\n" );
+ SetOpenFlag( g , 0 );
return 0;
}
diff --git a/test/vc6/test_hello/test_hello.plg b/test/vc6/test_hello/test_hello.plg
index fa22c86..36c4413 100644
--- a/test/vc6/test_hello/test_hello.plg
+++ b/test/vc6/test_hello/test_hello.plg
@@ -6,18 +6,18 @@
--------------------Configuration: test_afterrotatefile - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPDB.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP69.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_afterrotatefile.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_afterrotatefile.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_afterrotatefile.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPDB.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPDC.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP69.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP6A.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_afterrotatefile.pdb" /debug /machine:I386 /out:"Debug/test_afterrotatefile.exe" /pdbtype:sept
".\Debug\test_afterrotatefile.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPDC.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP6A.tmp"
Output Window
Compiling...
test_afterrotatefile.c
@@ -31,18 +31,18 @@ test_afterrotatefile.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_demo - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPDE.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP6C.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_demo.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_demo.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_demo.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPDE.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPDF.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP6C.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP6D.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_demo.pdb" /debug /machine:I386 /out:"Debug/test_demo.exe" /pdbtype:sept
".\Debug\test_demo.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPDF.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP6D.tmp"
Output Window
Compiling...
test_demo.c
@@ -56,18 +56,18 @@ test_demo.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_filterlogfunc - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE1.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP6F.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_filterlogfunc.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_filterlogfunc.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_filterlogfunc.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE1.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE2.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP6F.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP70.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_filterlogfunc.pdb" /debug /machine:I386 /out:"Debug/test_filterlogfunc.exe" /pdbtype:sept
".\Debug\test_filterlogfunc.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE2.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP70.tmp"
Output Window
Compiling...
test_filterlogfunc.c
@@ -81,18 +81,18 @@ test_filterlogfunc.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_funny - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE4.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP72.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_funny.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_funny.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_funny.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE4.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE5.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP72.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP73.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_funny.pdb" /debug /machine:I386 /out:"Debug/test_funny.exe" /pdbtype:sept
".\Debug\test_funny.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE5.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP73.tmp"
Output Window
Compiling...
test_funny.c
@@ -106,18 +106,18 @@ test_funny.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_hello - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE7.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP75.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "LOG_GLOBAL_ENV" /Fp"Debug/test_hello.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_hello.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_hello.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE7.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE8.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP75.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP76.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_hello.pdb" /debug /machine:I386 /out:"Debug/test_hello.exe" /pdbtype:sept
".\Debug\test_hello.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPE8.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP76.tmp"
Output Window
Compiling...
test_hello.c
@@ -131,18 +131,18 @@ test_hello.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_logconf - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPEA.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP78.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_logconf.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_logconf.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_logconf.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPEA.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPEB.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP78.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP79.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_logconf.pdb" /debug /machine:I386 /out:"Debug/test_logconf.exe" /pdbtype:sept
".\Debug\test_logconf.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPEB.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP79.tmp"
Output Window
Compiling...
test_logconf.c
@@ -156,18 +156,18 @@ test_logconf.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_logs - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPED.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP7B.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_logs.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_logs.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_logs.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPED.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPEE.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP7B.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP7C.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_logs.pdb" /debug /machine:I386 /out:"Debug/test_logs.exe" /pdbtype:sept
".\Debug\test_logs.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPEE.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP7C.tmp"
Output Window
Compiling...
test_logs.c
@@ -181,18 +181,18 @@ test_logs.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_logsconf - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF0.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP7E.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_logsconf.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_logsconf.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_logsconf.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF0.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF1.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP7E.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP7F.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_logsconf.pdb" /debug /machine:I386 /out:"Debug/test_logsconf.exe" /pdbtype:sept
".\Debug\test_logsconf.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF1.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP7F.tmp"
Output Window
Compiling...
test_logsconf.c
@@ -206,18 +206,18 @@ test_logsconf.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_memoryleak - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF3.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP81.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_memoryleak.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_memoryleak.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_memoryleak.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF3.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF4.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP81.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP82.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_memoryleak.pdb" /debug /machine:I386 /out:"Debug/test_memoryleak.exe" /pdbtype:sept
".\Debug\test_memoryleak.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF4.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP82.tmp"
Output Window
Compiling...
test_memoryleak.c
@@ -231,18 +231,18 @@ test_memoryleak.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_outputfunc - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF6.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP84.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_outputfunc.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_outputfunc.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_outputfunc.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF6.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF7.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP84.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP85.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_outputfunc.pdb" /debug /machine:I386 /out:"Debug/test_outputfunc.exe" /pdbtype:sept
".\Debug\test_outputfunc.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF7.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP85.tmp"
Output Window
Compiling...
test_outputfunc.c
@@ -256,18 +256,18 @@ test_outputfunc.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_press - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF9.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP87.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_press.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_press.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_press.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPF9.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPFA.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP87.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP88.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_press.pdb" /debug /machine:I386 /out:"Debug/test_press.exe" /pdbtype:sept
".\Debug\test_press.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPFA.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP88.tmp"
Output Window
Compiling...
test_press.c
@@ -281,18 +281,18 @@ test_press.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_press_mpt - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPFC.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP8A.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_press_mpt.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_press_mpt.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_press_mpt.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPFC.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPFD.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP8A.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP8B.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_press_mpt.pdb" /debug /machine:I386 /out:"Debug/test_press_mpt.exe" /pdbtype:sept
".\Debug\test_press_mpt.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPFD.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP8B.tmp"
Output Window
Compiling...
test_press_mpt.c
@@ -306,18 +306,18 @@ test_press_mpt.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_press_mpt_tls - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPFF.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP8D.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_press_mpt_tls.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_press_mpt_tls.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_press_mpt_tls.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSPFF.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP100.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP8D.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP8E.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_press_mpt_tls.pdb" /debug /machine:I386 /out:"Debug/test_press_mpt_tls.exe" /pdbtype:sept
".\Debug\test_press_mpt_tls.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP100.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP8E.tmp"
Output Window
Compiling...
test_press_mpt_tls.c
@@ -331,18 +331,18 @@ test_press_mpt_tls.exe - 0 error(s), 0 warning(s)
--------------------Configuration: test_stylesfunc - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP102.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP90.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_stylesfunc.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.3\test\test_stylesfunc.c"
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_stylesfunc.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP102.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP103.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP90.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP91.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_stylesfunc.pdb" /debug /machine:I386 /out:"Debug/test_stylesfunc.exe" /pdbtype:sept
".\Debug\test_stylesfunc.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP103.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP91.tmp"
Output Window
Compiling...
test_stylesfunc.c
diff --git a/test/vc6/test_logconf/test_logconf.plg b/test/vc6/test_logconf/test_logconf.plg
index 361d7db..3ae5bd5 100644
--- a/test/vc6/test_logconf/test_logconf.plg
+++ b/test/vc6/test_logconf/test_logconf.plg
@@ -6,27 +6,28 @@
--------------------Configuration: test_logconf - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP357.tmp" with contents
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP121.tmp" with contents
[
-/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_logconf.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"D:\Work\C Projects\iLOG3-1.0.0\test\test_logconf.c"
+/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test_logconf.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
+"D:\Work\C Projects\iLOG3-1.0.5\test\test_logconf.c"
]
-Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP357.tmp"
-Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP358.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP121.tmp"
+Creating temporary file "C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP122.tmp" with contents
[
-kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_logconf.pdb" /debug /machine:I386 /out:"Debug/test_logconf.exe" /pdbtype:sept
+kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iLOG3.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test_logconf.pdb" /debug /machine:I386 /out:"Debug/test_logconf.exe" /pdbtype:sept
".\Debug\test_logconf.obj"
]
-Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP358.tmp"
+Creating command line "link.exe @C:\DOCUME~1\calvin\LOCALS~1\Temp\RSP122.tmp"
Output Window
Compiling...
test_logconf.c
-Linking...
+d:\work\c projects\ilog3-1.0.5\test\test_logconf.c(44) : fatal error C1071: unexpected end of file found in comment
+Error executing cl.exe.
Results
-test_logconf.exe - 0 error(s), 0 warning(s)
+test_logconf.exe - 1 error(s), 0 warning(s)