1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:37:45 +00:00

Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)

Good-bye LogStream. Long live AK::Format!
This commit is contained in:
Andreas Kling 2021-03-12 17:29:37 +01:00
parent 423ed53396
commit ef1e5db1d0
209 changed files with 164 additions and 837 deletions

View file

@ -29,6 +29,7 @@
#include <AK/ScopeGuard.h>
#include <LibCore/Account.h>
#include <LibCore/File.h>
#include <errno.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>

View file

@ -26,7 +26,7 @@
#include "Command.h"
#include <AK/ByteBuffer.h>
#include <AK/LogStream.h>
#include <AK/Format.h>
#include <AK/ScopeGuard.h>
#include <LibCore/File.h>
#include <fcntl.h>

View file

@ -255,9 +255,4 @@ bool DateTime::is_before(const String& other) const
return __builtin_strcasecmp(now_string.characters(), other.characters()) < 0;
}
const LogStream& operator<<(const LogStream& stream, const DateTime& value)
{
return stream << value.to_string();
}
}

View file

@ -69,6 +69,4 @@ private:
unsigned m_second { 0 };
};
const LogStream& operator<<(const LogStream&, const DateTime&);
}

View file

@ -27,6 +27,7 @@
#include <AK/Vector.h>
#include <LibCore/DirIterator.h>
#include <errno.h>
#include <unistd.h>
namespace Core {

View file

@ -40,6 +40,7 @@
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
namespace Core {

View file

@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
namespace Core {

View file

@ -262,9 +262,4 @@ void Object::register_property(const String& name, Function<JsonValue()> getter,
m_properties.set(name, make<Property>(name, move(getter), move(setter)));
}
const LogStream& operator<<(const LogStream& stream, const Object& object)
{
return stream << object.class_name() << '{' << &object << '}';
}
}

View file

@ -223,8 +223,6 @@ T* Object::find_descendant_of_type_named(const String& name) requires IsBaseOf<O
return found_child;
}
const LogStream& operator<<(const LogStream&, const Object&);
#define REGISTER_INT_PROPERTY(property_name, getter, setter) \
register_property( \
property_name, \

View file

@ -1,36 +0,0 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <LibCore/SocketAddress.h>
namespace Core {
const LogStream& operator<<(const LogStream& stream, const SocketAddress& value)
{
return stream << value.to_string();
}
}

View file

@ -110,8 +110,6 @@ private:
String m_local_address;
};
const LogStream& operator<<(const LogStream&, const SocketAddress&);
}
template<>

View file

@ -27,7 +27,6 @@
#pragma once
#include <AK/Debug.h>
#include <AK/LogStream.h>
#include <AK/StdLibExtras.h>
#include <errno.h>
#include <string.h>

View file

@ -31,6 +31,7 @@
#include <LibCore/TCPSocket.h>
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#ifndef SOCK_NONBLOCK
# include <fcntl.h>

View file

@ -29,6 +29,7 @@
#include <LibCore/Notifier.h>
#include <LibCore/UDPServer.h>
#include <LibCore/UDPSocket.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>