From 2ebce7713d5bc1e3b9afa20f850081e17847d1aa Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 10 Mar 2021 20:17:45 -0600 Subject: [PATCH] [ox] Cleanup some messy trace points --- deps/ox/src/ox/fs/filesystem/passthroughfs.cpp | 6 +++--- deps/ox/src/ox/ptrarith/nodebuffer.hpp | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp index 6dcec650..191ea422 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp @@ -122,10 +122,10 @@ Result PassThroughFS::stat(const char *path) { const auto p = m_path / stripSlash(path); uint8_t type = std::filesystem::is_directory(p, ec) ? FileType_Directory : FileType_NormalFile; - oxTrace("PassThroughFS::stat") << ec.message().c_str() << path; + oxTrace("ox::fs::PassThroughFS::stat") << ec.message().c_str() << path; uint64_t size = type == FileType_Directory ? 0 : std::filesystem::file_size(p, ec); - oxTrace("PassThroughFS::stat") << ec.message().c_str() << path; - oxTrace("PassThroughFS::stat::size") << path << size; + oxTrace("ox::fs::PassThroughFS::stat") << ec.message().c_str() << path; + oxTrace("ox::fs::PassThroughFS::stat::size") << path << size; return {{0, 0, size, type}, OxError(ec.value())}; } diff --git a/deps/ox/src/ox/ptrarith/nodebuffer.hpp b/deps/ox/src/ox/ptrarith/nodebuffer.hpp index e57a0370..78abaecb 100644 --- a/deps/ox/src/ox/ptrarith/nodebuffer.hpp +++ b/deps/ox/src/ox/ptrarith/nodebuffer.hpp @@ -278,9 +278,7 @@ typename NodeBuffer::ItemPtr NodeBuffer::malloc(size return nullptr; } } - oxTrace("ox::ptrarith::NodeBuffer::malloc") << "buffer size:" << m_header.size - << ";addr:" << addr - << ";fullSize:" << fullSize; + oxTracef("ox::ptrarith::NodeBuffer::malloc", "buffer size: {}; addr: {}; fullSize: {}", m_header.size.get(), addr, fullSize); auto out = ItemPtr(this, m_header.size, addr, fullSize); if (!out.valid()) { oxTrace("ox::ptrarith::NodeBuffer::malloc::fail") << "Unknown"; @@ -352,10 +350,10 @@ Error NodeBuffer::free(ItemPtr item) { template Error NodeBuffer::setSize(size_t size) { - oxTrace("ox::ptrarith::NodeBuffer::setSize") << m_header.size << "to" << size; + oxTracef("ox::ptrarith::NodeBuffer::setSize", "{} to {}", m_header.size.get(), size); auto last = lastItem(); auto end = last.valid() ? last.end() : sizeof(m_header); - oxTrace("ox::ptrarith::NodeBuffer::setSize") << "end:" << end; + oxTracef("ox::ptrarith::NodeBuffer::setSize", "end: {}", end); if (end > size) { // resizing to less than buffer size return OxError(1);