mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
AK: Add set_debug_enabled method.
This commit is contained in:
parent
3179065466
commit
663a6141d8
2 changed files with 12 additions and 0 deletions
|
@ -652,8 +652,18 @@ void vout(FILE* file, StringView fmtstr, TypeErasedFormatParams params, bool new
|
|||
}
|
||||
#endif
|
||||
|
||||
static bool is_debug_enabled = true;
|
||||
|
||||
void set_debug_enabled(bool value)
|
||||
{
|
||||
is_debug_enabled = value;
|
||||
}
|
||||
|
||||
void vdbgln(StringView fmtstr, TypeErasedFormatParams params)
|
||||
{
|
||||
if (!is_debug_enabled)
|
||||
return;
|
||||
|
||||
StringBuilder builder;
|
||||
|
||||
// FIXME: This logic is redundant with the stuff in LogStream.cpp.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue