From 8099f667599b8ee6361c3dcd876db88a6ff5f4e6 Mon Sep 17 00:00:00 2001 From: shenyushi Date: Fri, 22 Dec 2023 20:22:24 +0800 Subject: [PATCH] Add log. --- src/storage/buffer/buffer_obj.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/storage/buffer/buffer_obj.cpp b/src/storage/buffer/buffer_obj.cpp index 6a6cb113b1..2b293ee258 100644 --- a/src/storage/buffer/buffer_obj.cpp +++ b/src/storage/buffer/buffer_obj.cpp @@ -56,7 +56,7 @@ BufferHandle BufferObj::Load() { case BufferStatus::kFreed: { buffer_mgr_->RequestSpace(GetBufferSize(), this); if (type_ != BufferType::kPersistent) { - LOG_WARN(Format("Load kEphemeral spill file {}/{} (Not from this address)", *file_worker_->file_dir_, *file_worker_->file_name_)); + LOG_WARN(Format("BufferObj::Load() kEphemeral spill file {}/{} (Not from this address)", *file_worker_->file_dir_, *file_worker_->file_name_)); } file_worker_->ReadFromFile(type_ != BufferType::kPersistent); if (type_ == BufferType::kEphemeral) { @@ -116,7 +116,7 @@ bool BufferObj::Free() { break; } case BufferType::kEphemeral: { - LOG_WARN(Format("{}: Free kEphemeral.", *file_worker_->file_name_)); + LOG_WARN(Format("BufferObj::Free {}/{}: Free kEphemeral.", *file_worker_->file_dir_, *file_worker_->file_name_)); file_worker_->WriteToFile(true); break; } @@ -142,7 +142,7 @@ bool BufferObj::Save() { switch (status_) { case BufferStatus::kLoaded: case BufferStatus::kUnloaded: { - LOG_WARN(Format("{}/{}: Save kEphemeral.", *file_worker_->file_dir_, *file_worker_->file_name_)); + LOG_WARN(Format("BufferObj::Save() {}/{}: Save kEphemeral.", *file_worker_->file_dir_, *file_worker_->file_name_)); file_worker_->WriteToFile(false); break; } @@ -163,7 +163,7 @@ bool BufferObj::Save() { void BufferObj::Sync() { file_worker_->Sync(); } void BufferObj::CloseFile() { - LOG_WARN(Format("BufferObj::Close {}", *file_worker_->file_name_)); + LOG_WARN(Format("BufferObj::CloseFile() {}/{}", *file_worker_->file_dir_, *file_worker_->file_name_)); file_worker_->CloseFile(); rw_locker_.unlock(); }