aboutsummaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/log/Logger.cpp17
-rw-r--r--src/base/platform/unix/PosixSpawnSubProcess.cpp2
-rw-r--r--src/base/platform/unix/UnixFile.cpp4
3 files changed, 3 insertions, 20 deletions
diff --git a/src/base/log/Logger.cpp b/src/base/log/Logger.cpp
index a3582305..d75e006b 100644
--- a/src/base/log/Logger.cpp
+++ b/src/base/log/Logger.cpp
@@ -167,21 +167,4 @@ void Logger::LogThreadRun() {
if (stop) return;
}
}
-
-LoggerCppStream::LoggerCppStream(ILogger* logger, LogLevel level,
- std::string tag)
- : logger_(logger), level_(level), tag_(std::move(tag)) {}
-
-LoggerCppStream LoggerCppStream::WithLevel(LogLevel level) const {
- return LoggerCppStream(this->logger_, level, this->tag_);
-}
-
-LoggerCppStream LoggerCppStream::WithTag(std::string tag) const {
- return LoggerCppStream(this->logger_, this->level_, std::move(tag));
-}
-
-void LoggerCppStream::Consume(std::string_view str) {
- this->logger_->Log(this->level_, this->tag_, std::string(str));
-}
-
} // namespace cru::log
diff --git a/src/base/platform/unix/PosixSpawnSubProcess.cpp b/src/base/platform/unix/PosixSpawnSubProcess.cpp
index c287d253..dd4f4cd2 100644
--- a/src/base/platform/unix/PosixSpawnSubProcess.cpp
+++ b/src/base/platform/unix/PosixSpawnSubProcess.cpp
@@ -146,7 +146,7 @@ SubProcessExitResult PosixSpawnSubProcessImpl::PlatformWaitForProcess() {
while (waitpid(pid_, &wstatus, 0) == -1) {
if (errno == EINTR) {
- CRU_LOG_TAG_INFO("Waitpid is interrupted by a signal. Call it again.");
+ CruLogInfo(kLogTag, "Waitpid is interrupted by a signal. Call it again.");
continue;
}
diff --git a/src/base/platform/unix/UnixFile.cpp b/src/base/platform/unix/UnixFile.cpp
index 001b4fb9..3d42516b 100644
--- a/src/base/platform/unix/UnixFile.cpp
+++ b/src/base/platform/unix/UnixFile.cpp
@@ -21,8 +21,8 @@ UnixFileDescriptor::~UnixFileDescriptor() {
constexpr auto kLogTag = "cru::platform::unix::UnixFileDescriptor";
if (this->IsValid() && this->IsAutoClose()) {
if (!this->DoClose()) {
- CRU_LOG_TAG_ERROR("Failed to close file descriptor {}, errno {}.",
- descriptor_, errno);
+ CruLogError(kLogTag, "Failed to close file descriptor {}, errno {}.",
+ descriptor_, errno);
}
}
}