feat: implement montauk::service_log & add support to system services

This commit is contained in:
daniel committed 2026-08-28 11:56:29 +02:00
1 parent 0d23db8a0e
commit b1f1cfe32b
8 files changed
+117 -62

No files matched your search

+7 -3
View File
@@ -5,6 +5,7 @@
*/
#include <montauk/syscall.h>
#include <montauk/service_log.h>
#include <print/print.hpp>
#include "test_page_jpeg.hpp"
@@ -64,12 +65,15 @@ static void write_daemon_state(const char* phase, const char* subject = nullptr,
}
static void log_msg(const char* fmt, ...) {
char body[768];
va_list ap;
va_start(ap, fmt);
printf("[printd] ");
vprintf(fmt, ap);
printf("\n");
vsnprintf(body, sizeof(body), fmt, ap);
va_end(ap);
char line[800];
snprintf(line, sizeof(line), "[printd] %s", body);
montauk::service_log(line);
}
static void set_job_state(JobMeta* job, const char* state, const char* message) {