diff options
Diffstat (limited to 'src/mongo/logger')
-rw-r--r-- | src/mongo/logger/log_function_test.cpp | 2 | ||||
-rw-r--r-- | src/mongo/logger/log_test.cpp | 2 | ||||
-rw-r--r-- | src/mongo/logger/parse_log_component_settings.cpp | 2 | ||||
-rw-r--r-- | src/mongo/logger/ramlog.cpp | 2 | ||||
-rw-r--r-- | src/mongo/logger/rotatable_file_writer.cpp | 42 |
5 files changed, 22 insertions, 28 deletions
diff --git a/src/mongo/logger/log_function_test.cpp b/src/mongo/logger/log_function_test.cpp index 6fbcabd6b28..f05616161f5 100644 --- a/src/mongo/logger/log_function_test.cpp +++ b/src/mongo/logger/log_function_test.cpp @@ -42,7 +42,7 @@ #include "mongo/logger/log_component.h" #include "mongo/logger/message_event_utf8_encoder.h" #include "mongo/util/log.h" -#include "mongo/util/mongoutils/str.h" +#include "mongo/util/str.h" using namespace mongo::logger; diff --git a/src/mongo/logger/log_test.cpp b/src/mongo/logger/log_test.cpp index ffdf16815e5..836e82bb8ea 100644 --- a/src/mongo/logger/log_test.cpp +++ b/src/mongo/logger/log_test.cpp @@ -49,7 +49,7 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/log.h" -#include "mongo/util/mongoutils/str.h" +#include "mongo/util/str.h" using namespace mongo::logger; diff --git a/src/mongo/logger/parse_log_component_settings.cpp b/src/mongo/logger/parse_log_component_settings.cpp index 281fe6f07dd..5c9f1688f32 100644 --- a/src/mongo/logger/parse_log_component_settings.cpp +++ b/src/mongo/logger/parse_log_component_settings.cpp @@ -41,7 +41,7 @@ #include "mongo/logger/log_component.h" #include "mongo/util/assert_util.h" #include "mongo/util/log.h" -#include "mongo/util/mongoutils/str.h" +#include "mongo/util/str.h" #include "mongo/util/stringutils.h" namespace mongo { diff --git a/src/mongo/logger/ramlog.cpp b/src/mongo/logger/ramlog.cpp index 80115fa236c..a1f32e26726 100644 --- a/src/mongo/logger/ramlog.cpp +++ b/src/mongo/logger/ramlog.cpp @@ -35,7 +35,7 @@ #include "mongo/base/status.h" #include "mongo/logger/message_event_utf8_encoder.h" #include "mongo/util/map_util.h" -#include "mongo/util/mongoutils/str.h" +#include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/logger/rotatable_file_writer.cpp b/src/mongo/logger/rotatable_file_writer.cpp index de59a408d63..fa22a7f1e4a 100644 --- a/src/mongo/logger/rotatable_file_writer.cpp +++ b/src/mongo/logger/rotatable_file_writer.cpp @@ -36,7 +36,7 @@ #include <fstream> #include "mongo/base/string_data.h" -#include "mongo/util/mongoutils/str.h" +#include "mongo/util/str.h" namespace mongo { namespace logger { @@ -211,33 +211,29 @@ Status RotatableFileWriter::Use::rotate(bool renameOnRotate, const std::string& if (renameOnRotate) { try { if (boost::filesystem::exists(renameTarget)) { - return Status( - ErrorCodes::FileRenameFailed, - mongoutils::str::stream() << "Renaming file " << _writer->_fileName - << " to " - << renameTarget - << " failed; destination already exists"); + return Status(ErrorCodes::FileRenameFailed, + str::stream() << "Renaming file " << _writer->_fileName << " to " + << renameTarget + << " failed; destination already exists"); } } catch (const std::exception& e) { - return Status( - ErrorCodes::FileRenameFailed, - mongoutils::str::stream() << "Renaming file " << _writer->_fileName << " to " - << renameTarget - << " failed; Cannot verify whether destination " - "already exists: " - << e.what()); + return Status(ErrorCodes::FileRenameFailed, + str::stream() << "Renaming file " << _writer->_fileName << " to " + << renameTarget + << " failed; Cannot verify whether destination " + "already exists: " + << e.what()); } boost::system::error_code ec; boost::filesystem::rename(_writer->_fileName, renameTarget, ec); if (ec) { return Status(ErrorCodes::FileRenameFailed, - mongoutils::str::stream() << "Failed to rename \"" - << _writer->_fileName - << "\" to \"" - << renameTarget - << "\": " - << ec.message()); + str::stream() << "Failed to rename \"" << _writer->_fileName + << "\" to \"" + << renameTarget + << "\": " + << ec.message()); // TODO(schwerin): Make errnoWithDescription() available in the logger library, and // use it here. } @@ -249,13 +245,11 @@ Status RotatableFileWriter::Use::rotate(bool renameOnRotate, const std::string& Status RotatableFileWriter::Use::status() { if (!_writer->_stream) { return Status(ErrorCodes::FileNotOpen, - mongoutils::str::stream() << "File \"" << _writer->_fileName - << "\" not open"); + str::stream() << "File \"" << _writer->_fileName << "\" not open"); } if (_writer->_stream->fail()) { return Status(ErrorCodes::FileStreamFailed, - mongoutils::str::stream() << "File \"" << _writer->_fileName - << "\" in failed state"); + str::stream() << "File \"" << _writer->_fileName << "\" in failed state"); } return Status::OK(); } |