Commit Graph

4 Commits

Author SHA1 Message Date
Andreas Kling
8075ba5064 LogStream: Add a simple-ish mechanism for colorizing and styling output.
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-15 20:22:30 +02:00
Andreas Kling
0e75aba7c3 StringView: Rename characters() to characters_without_null_termination().
This should make you think twice before trying to use the const char* from
a StringView as if it's a null-terminated string.
2019-07-08 15:38:44 +02:00
Andreas Kling
f9089da2bc LogStream: Uninline some public functions so the linker can find them. 2019-07-08 09:22:22 +02:00
Andreas Kling
1b013ba699 AK: Move some of LogStream out of line & add overloads for smart pointers. 2019-07-04 07:05:58 +02:00