From: Amos Jeffries Date: Sat, 3 Dec 2011 14:47:51 +0000 (-0700) Subject: Polish debug messages on swap.state rename failure X-Git-Tag: BumpSslServerFirst.take05~12^2~141 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2066f5a150c149ffbd900cf07bc1439a1801e9c7;p=thirdparty%2Fsquid.git Polish debug messages on swap.state rename failure --- diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index 449d5d6f0f..a2522b0395 100644 --- a/src/fs/ufs/store_dir_ufs.cc +++ b/src/fs/ufs/store_dir_ufs.cc @@ -742,14 +742,15 @@ UFSSwapDir::closeTmpSwapLog() file_close(swaplog_fd); if (xrename(new_path, swaplog_path) < 0) { - fatal("commonUfsDirCloseTmpSwapLog: rename failed"); + debugs(50, DBG_IMPORTANT, "ERROR: " << swaplog_path << ": " << xstrerror()); + fatalf("Failed to rename log file %s with .new", swaplog_path); } fd = file_open(swaplog_path, O_WRONLY | O_CREAT | O_BINARY); if (fd < 0) { - debugs(50, 1, "" << swaplog_path << ": " << xstrerror()); - fatal("commonUfsDirCloseTmpSwapLog: Failed to open swap log."); + debugs(50, DBG_IMPORTANT, "ERROR: " << swaplog_path << ": " << xstrerror()); + fatalf("Failed to open swap log ", swaplog_path); } safe_free(swaplog_path);