mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
AK: Remove out() and warn().
This commit is contained in:
parent
74d9616bec
commit
74438e6fdc
2 changed files with 0 additions and 38 deletions
|
@ -186,20 +186,6 @@ bool DebugLogStream::is_enabled()
|
||||||
bool DebugLogStream::s_enabled = true;
|
bool DebugLogStream::s_enabled = true;
|
||||||
|
|
||||||
#ifndef KERNEL
|
#ifndef KERNEL
|
||||||
StdLogStream::~StdLogStream()
|
|
||||||
{
|
|
||||||
char newline = '\n';
|
|
||||||
write(&newline, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void StdLogStream::write(const char* characters, int length) const
|
|
||||||
{
|
|
||||||
if (::write(m_fd, characters, length) < 0) {
|
|
||||||
perror("StdLogStream::write");
|
|
||||||
ASSERT_NOT_REACHED();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const LogStream& operator<<(const LogStream& stream, double value)
|
const LogStream& operator<<(const LogStream& stream, double value)
|
||||||
{
|
{
|
||||||
return stream << String::format("%.4f", value);
|
return stream << String::format("%.4f", value);
|
||||||
|
@ -209,7 +195,6 @@ const LogStream& operator<<(const LogStream& stream, float value)
|
||||||
{
|
{
|
||||||
return stream << String::format("%.4f", value);
|
return stream << String::format("%.4f", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void dump_bytes(ReadonlyBytes bytes)
|
void dump_bytes(ReadonlyBytes bytes)
|
||||||
|
|
|
@ -125,24 +125,6 @@ private:
|
||||||
static bool s_enabled;
|
static bool s_enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(KERNEL)
|
|
||||||
class StdLogStream final : public LogStream {
|
|
||||||
public:
|
|
||||||
StdLogStream(int fd)
|
|
||||||
: m_fd(fd)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
virtual ~StdLogStream() override;
|
|
||||||
virtual void write(const char* characters, int length) const override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
int m_fd { -1 };
|
|
||||||
};
|
|
||||||
|
|
||||||
[[deprecated("Use AK::outln or AK::new_out instead, AK::new_out will soon be renamed to AK::out.")]] inline StdLogStream out() { return StdLogStream(STDOUT_FILENO); }
|
|
||||||
[[deprecated("Use AK::warnln or AK::new_warn instead, AK::new_warn will soon be renamed to AK::warn.")]] inline StdLogStream warn() { return StdLogStream(STDERR_FILENO); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef KERNEL
|
#ifdef KERNEL
|
||||||
class KernelLogStream final : public BufferedLogStream {
|
class KernelLogStream final : public BufferedLogStream {
|
||||||
public:
|
public:
|
||||||
|
@ -212,8 +194,3 @@ void dump_bytes(ReadonlyBytes);
|
||||||
using AK::dbg;
|
using AK::dbg;
|
||||||
using AK::klog;
|
using AK::klog;
|
||||||
using AK::LogStream;
|
using AK::LogStream;
|
||||||
|
|
||||||
#if !defined(KERNEL)
|
|
||||||
using AK::out;
|
|
||||||
using AK::warn;
|
|
||||||
#endif
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue