Remove Abseil use from platfrom/api and platform/base.
Replaces Abseil library calls with STL equivalents, or re-implemented
equivalents. In particular, std::variant in ErrorOr<> was replaced with
a raw union (plus ctor/dtor voodoo). Also, cleaned up IPAddress ctors
and parsing routines.
Bug: openscreen:88
Change-Id: Idba4080a7b8e179067313fbcc04758a5463e621a
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1947904
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Jordan Bayles <jophba@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
diff --git a/platform/impl/logging_posix.cc b/platform/impl/logging_posix.cc
index ab92116..5d1d738 100644
--- a/platform/impl/logging_posix.cc
+++ b/platform/impl/logging_posix.cc
@@ -80,22 +80,22 @@
g_log_level = level;
}
-bool IsLoggingOn(LogLevel level, absl::string_view file) {
+bool IsLoggingOn(LogLevel level, const char* file) {
// Possible future enhancement: Use glob patterns passed on the command-line
// to use a different logging level for certain files, like in Chromium.
return level >= g_log_level;
}
void LogWithLevel(LogLevel level,
- absl::string_view file,
+ const char* file,
int line,
- absl::string_view msg) {
+ std::stringstream message) {
if (level < g_log_level)
return;
std::stringstream ss;
ss << "[" << level << ":" << file << "(" << line << "):T" << std::hex
- << TRACE_CURRENT_ID << "] " << msg << '\n';
+ << TRACE_CURRENT_ID << "] " << message.rdbuf() << '\n';
const auto ss_str = ss.str();
const auto bytes_written = write(g_log_fd, ss_str.c_str(), ss_str.size());
OSP_DCHECK(bytes_written);