Author: mturk
Date: Mon Mar  8 11:45:37 2010
New Revision: 920281

URL: http://svn.apache.org/viewvc?rev=920281&view=rev
Log:
Use StringCbPrintf instead sprintf_s and use existing logger for logging new 
rotation file name

Modified:
    tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=920281&r1=920280&r2=920281&view=diff
==============================================================================
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon Mar  8 11:45:37 2010
@@ -2437,7 +2437,7 @@
             strftime(log_file_name, sizeof(log_file_name_buf), log_file, 
tm_now);
         } else {
             /* Otherwise append the number of seconds to the base name */      
  
-            sprintf_s(log_file_name, sizeof(log_file_name_buf), "%s.%d", 
log_file, (long)t);
+            StringCbPrintf(log_file_name, sizeof(log_file_name_buf), "%s.%d", 
log_file, (long)t);
         }
     } else {
         log_file_name = log_file;
@@ -2445,10 +2445,7 @@
 
     /* Close the current log file if required, and the effective log file name 
has changed */
     if (log_open && strncmp(log_file_name, log_file_effective, 
strlen(log_file_name)) != 0) {
-        FILE* lf = ((jk_file_logger_t* )logger->logger_private)->logfile;
-        fprintf_s(lf, "Log rotated to %s\r\n", log_file_name);
-        fflush(lf);
-
+        jk_log(logger, JK_LOG_INFO, "Log rotated to %s", log_file_name);
         rc = jk_close_file_logger(&logger);
         log_open = JK_FALSE;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to