[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:
@@ -21,10 +21,11 @@ namespace syscalls {
|
||||
using system = class ::system;
|
||||
|
||||
j6_status_t
|
||||
log(const char *message)
|
||||
log(uint8_t area, uint8_t severity, const char *message)
|
||||
{
|
||||
thread &th = thread::current();
|
||||
log::info(logs::syscall, "Message <%02lx:%02lx>: %s", th.parent().obj_id(), th.obj_id(), message);
|
||||
log::log(static_cast<logs>(area), static_cast<log::level>(severity),
|
||||
"<%02lx:%02lx>: %s", th.parent().obj_id(), th.obj_id(), message);
|
||||
return j6_status_ok;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user