summaryrefslogtreecommitdiff
path: root/AK/LogStream.h
AgeCommit message (Collapse)Author
2020-07-03AK: Serialize entire log statementsTom
Prior to this, we wrote to the log every time the << operator was used, which meant that only these parts of the log statement were serialized. If the thread was preempted, or especially with multiple CPUs the debug output was hard to decipher. Instead, we buffer up the log statements. To avoid allocations we'll attempt to use stack space, which covers most log statements.
2020-05-16Kernel: Absorb LibBareMetal back into the kernelAndreas Kling
This was supposed to be the foundation for some kind of pre-kernel environment, but nobody is working on it right now, so let's move everything back into the kernel and remove all the confusion.
2020-05-08AK: Declare LogStream::operator<<(const LogStream&, long) (#2155)Devashish Jaiswal
LogStream::operator<<(const LogStream&, long) was implemented in AK/LogStream.cpp but the declaration was missing from the header.
2020-04-12AK: Add LogStream operator<< overloads for float and doubleAndreas Kling
2020-04-06AK: Add out() and warn() streams that forward to stdout and stderrAndreas Kling
Our C++ code generator tools have been relying on host-side dbg() being forwarded to stdout until now. Now they use out() instead. Hopefully this will make it easier and more enticing to use streams in userspace programs as well. :^)
2020-03-22AK: Add FlyString::to_lowercase() and LogStream operator<<(FlyString)Andreas Kling
2020-03-04AK: LogStream should handle being passed a null const char*Andreas Kling
2020-03-02AK: Add support for Kernel Log StreamLiav A
2020-02-14AK: Add a forward declaration headerAndreas Kling
You can now #include <AK/Forward.h> to get most of the AK types as forward declarations. Header dependency explosion is one of the main contributors to compile times at the moment, so this is a step towards smaller include graphs.
2020-02-09AK: Apply changes for the Bootstrapper environmentLiav A
2020-02-05AK: Break LogStream::operator<< overloads into i/l/ll and u/ul/ullAndreas Kling
2020-02-05AK: Add support for 64-bit size_tjoshua stein
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-12-20Build: Get rid of the USERLAND defineAndreas Kling
Let's simplify things. There is now only KERNEL. To see if you're on Serenity, check if __serenity__ is defined.
2019-12-09AK: Handle LogStream operator<<(size_t)Andreas Kling
This has been an annoyingly missing feature for some time.
2019-11-06AK: Get rid of TStyle (output styling helper for LogStream)Andreas Kling
This didn't end up getting used, so let's get rid of it.
2019-08-15LogStream: Prefix userspace dbg() output with "ProcessName(PID): "Andreas Kling
Using the new get_process_name() syscall, we can automatically prefix all userspace debug logging. Hopefully this is more helpful than annoying. We'll find out! :^)
2019-07-25AK: Rename ValueRestorer => ScopedValueRollback.Andreas Kling
Qt had a pretty good name for this concept, so let's steal it. :^)
2019-07-25LogStream: Preserve errno for the lifetime of a LogStream object.Andreas Kling
2019-07-21Kernel+LibC: Add a dbgputstr() syscall for sending strings to debug output.Andreas Kling
This is very handy for the DebugLogStream implementation, among others. :^)
2019-07-15LogStream: Add a simple-ish mechanism for colorizing and styling output.Andreas Kling
Meet TStyle. It allows you to write things like this: dbg() << TStyle(TStyle::Red, TStyle::Bold) << "Hello, friends!"; Any style used will be reset along with the newline emitted when the dbg() temporary goes out of scope. :^) This can definitely be improved, but I think it's a decent place to start.
2019-07-04AK: Move some of LogStream out of line & add overloads for smart pointers.Andreas Kling
2019-07-04AK: Start fleshing out LogStream, a type-aware logging mechanism.Andreas Kling
The first implementation class is DebugLogStream, which can be used like so: dbg() << "Hello friends, I am " << m_years << " years old!"; Note that it will automatically print a newline when the object created by dbg() goes out of scope. This API will grow and evolve, so let's see what we end up with :^)