mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
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:
parent
2e9fcc17a0
commit
685c8c3d40
Notes:
sideshowbarker
2024-07-17 03:59:29 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/685c8c3d40 Pull-request: https://github.com/SerenityOS/serenity/pull/20143 Reviewed-by: https://github.com/AtkinsSJ ✅
26
AK/Format.h
26
AK/Format.h
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user