summaryrefslogtreecommitdiff
path: root/Userland/Services/SystemServer/main.cpp
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-17 18:39:00 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-22 22:14:30 +0100
commit24888457d5ee7e3df8015cdc4481ccaa25d07565 (patch)
tree39ded43561f474c5e8b9422ac4f44a469ff0b12f /Userland/Services/SystemServer/main.cpp
parent3f23a58fa1a0de922e36d82adccfccfb78b4049f (diff)
downloadserenity-24888457d5ee7e3df8015cdc4481ccaa25d07565.zip
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
Diffstat (limited to 'Userland/Services/SystemServer/main.cpp')
-rw-r--r--Userland/Services/SystemServer/main.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Userland/Services/SystemServer/main.cpp b/Userland/Services/SystemServer/main.cpp
index 6409b0eda6..2cc0c9166e 100644
--- a/Userland/Services/SystemServer/main.cpp
+++ b/Userland/Services/SystemServer/main.cpp
@@ -27,6 +27,7 @@
#include "Service.h"
#include <AK/Assertions.h>
#include <AK/ByteBuffer.h>
+#include <AK/Debug.h>
#include <LibCore/ConfigFile.h>
#include <LibCore/Event.h>
#include <LibCore/EventLoop.h>
@@ -53,9 +54,7 @@ static void sigchld_handler(int)
if (pid == 0)
break;
-#ifdef SYSTEMSERVER_DEBUG
- dbg() << "Reaped child with pid " << pid << ", exit status " << status;
-#endif
+ dbgln<debug_system_server>("Reaped child with pid {}, exit status {}", pid, status);
Service* service = Service::find_by_pid(pid);
if (service == nullptr) {
@@ -71,18 +70,18 @@ static void parse_boot_mode()
{
auto f = Core::File::construct("/proc/cmdline");
if (!f->open(Core::IODevice::ReadOnly)) {
- dbg() << "Failed to read command line: " << f->error_string();
+ dbgln("Failed to read command line: {}", f->error_string());
return;
}
const String cmdline = String::copy(f->read_all(), Chomp);
- dbg() << "Read command line: " << cmdline;
+ dbgln("Read command line: {}", cmdline);
for (auto& part : cmdline.split_view(' ')) {
auto pair = part.split_view('=', 2);
if (pair.size() == 2 && pair[0] == "boot_mode")
g_boot_mode = pair[1];
}
- dbg() << "Booting in " << g_boot_mode << " mode";
+ dbgln("Booting in {} mode", g_boot_mode);
}
static void prepare_devfs()
@@ -234,7 +233,7 @@ int main(int, char**)
}
// After we've set them all up, activate them!
- dbg() << "Activating " << services.size() << " services...";
+ dbgln("Activating {} services...", services.size());
for (auto& service : services)
service.activate();