Skip to content

Commit

Permalink
Print entire debug message in one go.
Browse files Browse the repository at this point in the history
  • Loading branch information
dacut committed Jun 15, 2016
1 parent cc807da commit eafd7b5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion c++-client/s3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ void UBDS3Volume::createVolume(
config.WriteReadable(*body);
body->seekg(0);

S3Client s3(getS3Configuration());
S3Client s3(getS3Credentials(), getS3Configuration());
PutObjectRequest req;
req.SetBucket(m_bucket_name);
req.SetKey(m_devname + ".volinfo");
Expand Down Expand Up @@ -754,6 +754,12 @@ void UBDS3Volume::readBlock(
req.SetBucket(m_bucket_name);
req.SetKey(key);

{
ostringstream msg;
msg << std::this_thread::get_id() << ": blockToPrefix(" << block_id << ") -> " << key << "\n";
cerr << msg.str() << std::flush;
}

while (true) {
auto outcome = s3.GetObject(req);

Expand Down Expand Up @@ -817,6 +823,12 @@ void UBDS3Volume::writeBlock(

shared_ptr<stringstream> body(new stringstream);

{
ostringstream msg;
msg << std::this_thread::get_id() << ": blockToPrefix(" << block_id << ") -> " << key << "\n";
cerr << msg.str() << std::flush;
}

body->rdbuf()->pubsetbuf(
const_cast<char *>(static_cast<char const *>(buffer)), m_block_size);

Expand Down

0 comments on commit eafd7b5

Please sign in to comment.