summaryrefslogtreecommitdiff
path: root/Userland/DevTools/UserspaceEmulator/Report.h
blob: 453a0dd78fc6c5f62b548b8f7418eacca86416e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright (c) 2020, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/Format.h>

extern bool g_report_to_debug;

template<typename... Ts>
void reportln(const StringView& format, Ts... args)
{
    if (g_report_to_debug)
        AK::vdbgln(format, AK::VariadicFormatParams { args... });
    else
        warnln(format, args...);
}