Skip to content

Commit

Permalink
make the disk debug logging output a bit nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Oct 20, 2024
1 parent 8011f10 commit 2fece8d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions include/libtorrent/aux_/debug_disk_thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,39 @@ inline std::string print_job(aux::disk_job const& j)
explicit print_visitor(std::stringstream& s) : m_ss(s) {}

void operator()(job::read const& j) const {
m_ss << "read ( size:" << j.buffer_size << " piece:" << j.piece << " offset:" << j.offset << " )";
m_ss << "read ( size: " << j.buffer_size << " piece: " << j.piece << " offset: " << j.offset << " )";
}

void operator()(job::write const& j) const {
m_ss << "write( size:" << j.buffer_size << " piece:" << j.piece << " offset:" << j.offset << " )";
m_ss << "write( size: " << j.buffer_size << " piece: " << j.piece << " offset: " << j.offset << " )";
}

void operator()(job::hash const& j) const {
m_ss << "hash( piece:" << j.piece << " )";
m_ss << "hash( piece: " << j.piece << " )";
}

void operator()(job::hash2 const& j) const {
m_ss << "hash( piece:" << j.piece << " offset:" << j.offset << " )";
m_ss << "hash( piece: " << j.piece << " offset: " << j.offset << " )";
}

void operator()(job::move_storage const& j) const {
m_ss << "move-storage( path:" << j.path << " flags:" << int(j.move_flags) << " )";
m_ss << "move-storage( path: " << j.path << " flags: " << int(j.move_flags) << " )";
}

void operator()(job::release_files const&) const {
m_ss << "move-storage( )";
}

void operator()(job::delete_files const& j) const {
m_ss << "delete-files ( flags:" << j.flags << " )";
m_ss << "delete-files ( flags: " << j.flags << " )";
}

void operator()(job::check_fastresume const&) const {
m_ss << "check-fastresume( )";
}

void operator()(job::rename_file const& j) const {
m_ss << "rename-file( file:" << j.file_index << " name:" << j.name << " )";
m_ss << "rename-file( file: " << j.file_index << " name: " << j.name << " )";
}

void operator()(job::stop_torrent const&) const {
Expand All @@ -89,8 +89,8 @@ inline std::string print_job(aux::disk_job const& j)
}

void operator()(job::partial_read const& j) const {
m_ss << "partial-read( piece:" << j.piece << " offset:" << j.offset
<< " buf-offset:" << j.buffer_offset << " size:" << j.buffer_size << " )";
m_ss << "partial-read( piece: " << j.piece << " offset: " << j.offset
<< " buf-offset: " << j.buffer_offset << " size: " << j.buffer_size << " )";
}

private:
Expand Down

0 comments on commit 2fece8d

Please sign in to comment.