1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

AK+Format: Add dmesgln() to replace klog().

This commit is contained in:
asynts 2021-01-23 13:58:23 +01:00 committed by Andreas Kling
parent 1c1e577a5e
commit a7d5fbb8af
2 changed files with 37 additions and 5 deletions

View file

@ -405,6 +405,16 @@ void dbgln() { dbgln<enabled>(""); }
void set_debug_enabled(bool);
#ifdef KERNEL
void vdmesgln(StringView fmtstr, TypeErasedFormatParams);
template<typename... Parameters>
void dmesgln(StringView fmtstr, const Parameters&... parameters) { vdmesgln(fmtstr, VariadicFormatParams { parameters... }); }
template<typename... Parameters>
void dmesgln(const char* fmtstr, const Parameters&... parameters) { vdmesgln(fmtstr, VariadicFormatParams { parameters... }); }
inline void dmesgln() { dmesgln(""); }
#endif
template<typename T, typename = void>
struct HasFormatter : TrueType {
};
@ -459,7 +469,9 @@ struct Formatter<FormatString> : Formatter<String> {
} // namespace AK
#ifndef KERNEL
#ifdef KERNEL
using AK::dmesgln;
#else
using AK::out;
using AK::outln;