commit 768681e9168b738461caae59889cfd5ca0443126
Author: Elan Ruusamäe <[email protected]>
Date:   Tue Aug 11 00:19:30 2015 +0300

    fix silly space in archive filename
    
    fixes errors like:
    
    [1439240400] Error: Unable to rename file '/var/log/nagios/nagios.log' to ' 
/var/log/nagios/archives/nagios-2015-08-11-00.log': No such file or directory

 archivelog-timeformat.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/archivelog-timeformat.patch b/archivelog-timeformat.patch
index 545f524..12156b0 100644
--- a/archivelog-timeformat.patch
+++ b/archivelog-timeformat.patch
@@ -8,7 +8,7 @@ ideally this should came from config (date_format=iso8601)
  
        /* get the archived filename to use */
 -      asprintf(&log_archive, "%s%snagios-%02d-%02d-%d-%02d.log", 
log_archive_path, (log_archive_path[strlen(log_archive_path) - 1] == '/') ? "" 
: "/", t->tm_mon + 1, t->tm_mday, t->tm_year + 1900, t->tm_hour);
-+      asprintf(&log_archive," %s%snagios-%04d-%02d-%02d-%02d.log", 
log_archive_path, (log_archive_path[strlen(log_archive_path) - 1] == '/') ? "" 
: "/", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour);
++      asprintf(&log_archive, "%s%snagios-%04d-%02d-%02d-%02d.log", 
log_archive_path, (log_archive_path[strlen(log_archive_path) - 1] == '/') ? "" 
: "/", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour);
  
        /* rotate the log file */
        rename_result = my_rename(log_file, log_archive);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios.git/commitdiff/661e946f8228d9c47caec2220f467a3914a8eb21

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to