diff options
author | asynts <asynts@gmail.com> | 2021-01-11 13:04:22 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-11 21:49:29 +0100 |
commit | a410bb8fd5a3a66c7285b0afc4f46f851cb8a965 (patch) | |
tree | 39af109f21b47bde8c733831612f8dcf7f3b44b0 /Libraries/LibCore | |
parent | 510030971bb8670af373fb35f2fc567687ee4766 (diff) | |
download | serenity-a410bb8fd5a3a66c7285b0afc4f46f851cb8a965.zip |
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
Diffstat (limited to 'Libraries/LibCore')
-rw-r--r-- | Libraries/LibCore/Gzip.cpp | 7 | ||||
-rw-r--r-- | Libraries/LibCore/Socket.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibCore/UDPServer.cpp | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/Libraries/LibCore/Gzip.cpp b/Libraries/LibCore/Gzip.cpp index 268e9a4702..49cf14c3a0 100644 --- a/Libraries/LibCore/Gzip.cpp +++ b/Libraries/LibCore/Gzip.cpp @@ -50,7 +50,6 @@ static Optional<ByteBuffer> get_gzip_payload(const ByteBuffer& data) ASSERT_NOT_REACHED(); return (u8)0; } - // dbg() << "read_byte: " << String::format("%x", data[current]); return data[current++]; }; @@ -67,7 +66,7 @@ static Optional<ByteBuffer> get_gzip_payload(const ByteBuffer& data) // Compression method auto method = read_byte(); if (method != 8) { - dbg() << "get_gzip_payload: Wrong compression method = " << method; + dbgln("get_gzip_payload: Wrong compression method={}", method); return Optional<ByteBuffer>(); } @@ -79,7 +78,7 @@ static Optional<ByteBuffer> get_gzip_payload(const ByteBuffer& data) // FEXTRA if (flags & 4) { u16 length = read_byte() & read_byte() << 8; - dbg() << "get_gzip_payload: Header has FEXTRA flag set. Length = " << length; + dbgln("get_gzip_payload: Header has FEXTRA flag set. length={}", length); current += length; } @@ -155,7 +154,7 @@ Optional<ByteBuffer> Gzip::decompress(const ByteBuffer& data) #endif destination.grow(destination.size() * 2); } else { - dbg() << "Gzip::decompress: Error. puff() returned: " << puff_ret; + dbgln("Gzip::decompress: Error. puff() returned: {}", puff_ret); ASSERT_NOT_REACHED(); } } diff --git a/Libraries/LibCore/Socket.cpp b/Libraries/LibCore/Socket.cpp index 98d8b2566a..4ced6734b1 100644 --- a/Libraries/LibCore/Socket.cpp +++ b/Libraries/LibCore/Socket.cpp @@ -75,7 +75,7 @@ bool Socket::connect(const String& hostname, int port) { auto* hostent = gethostbyname(hostname.characters()); if (!hostent) { - dbg() << "Socket::connect: Unable to resolve '" << hostname << "'"; + dbgln("Socket::connect: Unable to resolve '{}'", hostname); return false; } diff --git a/Libraries/LibCore/UDPServer.cpp b/Libraries/LibCore/UDPServer.cpp index b7aaea78e7..6716865e6b 100644 --- a/Libraries/LibCore/UDPServer.cpp +++ b/Libraries/LibCore/UDPServer.cpp @@ -86,7 +86,7 @@ ByteBuffer UDPServer::receive(size_t size, sockaddr_in& in) socklen_t in_len = sizeof(in); ssize_t rlen = ::recvfrom(m_fd, buf.data(), size, 0, (sockaddr*)&in, &in_len); if (rlen < 0) { - dbg() << "recvfrom: " << strerror(errno); + dbgln("recvfrom: {}", strerror(errno)); return {}; } |