20 #include "pedigree/kernel/Log.h" 21 #include "pedigree/kernel/Spinlock.h" 22 #include "pedigree/kernel/machine/Machine.h" 23 #include "pedigree/kernel/machine/Serial.h" 24 #include "pedigree/kernel/utilities/Cord.h" 32 virtual void callback(
const LogCord &cord);
42 void installSerialLogger()
47 SerialLogger::SerialLogger()
48 : m_pSerial(
nullptr), m_bInitialised(
false), m_Lock(
false)
51 SerialLogger::~SerialLogger() =
default;
53 void SerialLogger::callback(
const LogCord &cord)
57 m_bInitialised = Machine::instance().isInitialised();
64 m_pSerial = Machine::instance().
getSerial(0);
73 #ifndef SERIAL_IS_FILE 78 m_pSerial->write(
'\r');
virtual Serial * getSerial(size_t n)=0
bool acquire(bool recurse=false, bool safe=true)
static EXPORTED_PUBLIC Log & instance()
EXPORTED_PUBLIC void installCallback(LogCallback *pCallback, bool bSkipBacklog=false)