Revert "AK: Automatically copy all warn/warnln logs to debug console"

This reverts commit d48c68cf3f.

Unfortunately, this currently copies some warn() invocations that we do
*not* want in the debug console, such as test-js's use of OSC command 9
to report progress.
This commit is contained in:
Timothy Flynn 2023-07-22 08:59:08 -04:00 committed by Tim Flynn
parent 2e9fcc17a0
commit 685c8c3d40
Notes: sideshowbarker 2024-07-17 03:59:29 +09:00

View File

@ -557,9 +557,6 @@ struct Formatter<nullptr_t> : Formatter<FlatPtr> {
ErrorOr<void> vformat(StringBuilder&, StringView fmtstr, TypeErasedFormatParams&);
void vdbg(StringView fmtstr, TypeErasedFormatParams&, bool newline = false);
void dbgln();
#ifndef KERNEL
void vout(FILE*, StringView fmtstr, TypeErasedFormatParams&, bool newline = false);
@ -596,30 +593,13 @@ inline void outln() { outln(stdout); }
template<typename... Parameters>
void warn(CheckedFormatString<Parameters...>&& fmtstr, Parameters const&... parameters)
{
# ifdef AK_OS_SERENITY
VariadicFormatParams<AllowDebugOnlyFormatters::Yes, Parameters...> variadic_format_params { parameters... };
vdbg(fmtstr.view(), variadic_format_params, false);
# endif
out(stderr, move(fmtstr), parameters...);
}
template<typename... Parameters>
void warnln(CheckedFormatString<Parameters...>&& fmtstr, Parameters const&... parameters)
{
# ifdef AK_OS_SERENITY
VariadicFormatParams<AllowDebugOnlyFormatters::Yes, Parameters...> variadic_format_params { parameters... };
vdbg(fmtstr.view(), variadic_format_params, true);
# endif
outln(stderr, move(fmtstr), parameters...);
}
void warnln(CheckedFormatString<Parameters...>&& fmtstr, Parameters const&... parameters) { outln(stderr, move(fmtstr), parameters...); }
inline void warnln()
{
# ifdef AK_OS_SERENITY
dbgln();
# endif
outln(stderr);
}
inline void warnln() { outln(stderr); }
# define warnln_if(flag, fmt, ...) \
do { \
@ -629,6 +609,8 @@ inline void warnln()
#endif
void vdbg(StringView fmtstr, TypeErasedFormatParams&, bool newline = false);
template<typename... Parameters>
void dbg(CheckedFormatString<Parameters...>&& fmtstr, Parameters const&... parameters)
{