[libj6] Add log area and severity to j6::syslog()

User code can now set the log area and severity of log messages. This also updates the j6_log
syscall to take these parameters, but removes all calls to it except through j6::syslog().
This commit is contained in:
Justin C. Miller
2024-02-24 13:39:24 -08:00
parent a1e2c58afc
commit bc46c9a7d5
22 changed files with 114 additions and 77 deletions

View File

@@ -47,7 +47,7 @@ channel::create(size_t size)
j6_handle_t vma = j6_handle_invalid;
if (size < arch::frame_size || (size & (size - 1)) != 0) {
syslog("Bad channel size: %lx", size);
syslog(j6::logs::ipc, j6::log_level::error, "Bad channel size: %lx", size);
return nullptr;
}
@@ -58,7 +58,7 @@ channel::create(size_t size)
result = j6_vma_create_map(&vma, size, &addr, j6_vm_flag_write|j6_vm_flag_ring);
if (result != j6_status_ok) {
syslog("Failed to create channel VMA. Error: %lx", result);
syslog(j6::logs::ipc, j6::log_level::error, "Failed to create channel VMA. Error: %lx", result);
return nullptr;
}
@@ -79,7 +79,7 @@ channel::open(j6_handle_t vma)
result = j6_vma_map(vma, 0, &addr, 0);
if (result != j6_status_ok) {
syslog("Failed to map channel VMA. Error: %lx", result);
syslog(j6::logs::ipc, j6::log_level::error, "Failed to map channel VMA. Error: %lx", result);
return nullptr;
}