|
@@ -70,6 +70,19 @@ public:
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+#if !defined(BOOTSTRAPPER) && defined(KERNEL)
|
|
|
+class KernelLogStream final : public LogStream {
|
|
|
+public:
|
|
|
+ KernelLogStream() {}
|
|
|
+ virtual ~KernelLogStream() override;
|
|
|
+
|
|
|
+ virtual void write(const char* characters, int length) const override
|
|
|
+ {
|
|
|
+ kernelputstr(characters, length);
|
|
|
+ }
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
inline const LogStream& operator<<(const LogStream& stream, const char* value)
|
|
|
{
|
|
|
int length = 0;
|
|
@@ -103,7 +116,14 @@ inline const LogStream& operator<<(const LogStream& stream, bool value)
|
|
|
|
|
|
DebugLogStream dbg();
|
|
|
|
|
|
+#if defined(KERNEL)
|
|
|
+KernelLogStream klog();
|
|
|
+#elif !defined(BOOTSTRAPPER)
|
|
|
+DebugLogStream klog();
|
|
|
+#endif
|
|
|
+
|
|
|
}
|
|
|
|
|
|
using AK::dbg;
|
|
|
+using AK::klog;
|
|
|
using AK::LogStream;
|