modus

The program log

A system tool: the log of the machine, as records.

Each record has a time, a program, a thread, a level, a channel and a text. The kernel writes the records in one memory object; this program maps it with the right Read, and waits on its counter. The top part counts the records of each channel. The bottom part shows the last records: the color of the mark is the level, and the color of the name is the program.

The program needs the grant to read the records of the log. It is also a service: records() gives the records as a table (exports.odin).

FactValue
Sourceprograms/log
Boot imagein the boot image; the image is not built, so its size is not known
Importsnone
Imported bynone

Exports

ExportWhat it does
records(after: Integer) -> Table(Record)gives the log records from the number `after` on: the number, the time in microseconds, the program and its slot, the level, the channel, and the text
entry()

Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).

What the root service gives it

WhatValueAs the root service says
Grants{.Log_Records, .Serve}It serves records() to a caller that acts for the person.
Budget: pages, programs, threads{pages = 2048, programs = 1, threads = 1}Not named in things_of: the budget of each other program.

Read from grants_of and things_of in programs/root/main.odin; budget_of in the same file adds the limits of processor time and of log records.