mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:17:34 +00: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
1 changed files with 4 additions and 22 deletions
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&);
|
ErrorOr<void> vformat(StringBuilder&, StringView fmtstr, TypeErasedFormatParams&);
|
||||||
|
|
||||||
void vdbg(StringView fmtstr, TypeErasedFormatParams&, bool newline = false);
|
|
||||||
void dbgln();
|
|
||||||
|
|
||||||
#ifndef KERNEL
|
#ifndef KERNEL
|
||||||
void vout(FILE*, StringView fmtstr, TypeErasedFormatParams&, bool newline = false);
|
void vout(FILE*, StringView fmtstr, TypeErasedFormatParams&, bool newline = false);
|
||||||
|
|
||||||
|
@ -596,30 +593,13 @@ inline void outln() { outln(stdout); }
|
||||||
template<typename... Parameters>
|
template<typename... Parameters>
|
||||||
void warn(CheckedFormatString<Parameters...>&& fmtstr, Parameters const&... 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...);
|
out(stderr, move(fmtstr), parameters...);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename... Parameters>
|
template<typename... Parameters>
|
||||||
void warnln(CheckedFormatString<Parameters...>&& fmtstr, Parameters const&... parameters)
|
void warnln(CheckedFormatString<Parameters...>&& fmtstr, Parameters const&... parameters) { outln(stderr, move(fmtstr), 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...);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void warnln()
|
inline void warnln() { outln(stderr); }
|
||||||
{
|
|
||||||
# ifdef AK_OS_SERENITY
|
|
||||||
dbgln();
|
|
||||||
# endif
|
|
||||||
outln(stderr);
|
|
||||||
}
|
|
||||||
|
|
||||||
# define warnln_if(flag, fmt, ...) \
|
# define warnln_if(flag, fmt, ...) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -629,6 +609,8 @@ inline void warnln()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void vdbg(StringView fmtstr, TypeErasedFormatParams&, bool newline = false);
|
||||||
|
|
||||||
template<typename... Parameters>
|
template<typename... Parameters>
|
||||||
void dbg(CheckedFormatString<Parameters...>&& fmtstr, Parameters const&... parameters)
|
void dbg(CheckedFormatString<Parameters...>&& fmtstr, Parameters const&... parameters)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue