This is currently a draft page ...
Logging Subsystem Components[edit | edit source]
- Generic API to logging.
- hardcoded processor for debug log output. used for
- other log types until exec can handle memory requests.
- hardcoded processor used after log.resource:init() to process all but debug logging.
- NB -: should not be used inside allocmem/freemem (since it may use them) or IRQs
- rom resident listener which dumps DEBUG type log output to the serial device
- (configurable via grub command line)
Support Commands[edit | edit source]
- BufferLog LOGTYPE OUTPUTFILE
- Registers a listener for the specified LOGTYPE which Buffers log output to an OUTPUTFILE.
- Tools/LogViewer LOGFILE
- Tool used to display LOGFILE's buffered with C:BufferLog.
Logging Subsystem Operations[edit | edit source]
Logging API's[edit | edit source]
LOGR_RegisterProcessor[edit | edit source]
LOGR_RegisterListener[edit | edit source]
LOGR_LogEvent[edit | edit source]
Used to output data to a specified log.
LOGR_ObtainLogEvents[edit | edit source]
Returns a per caller handle. if (LOG_EVENTFLAGS == LOG_EVENTLIST_UNIQUE) then it will only succeed if no other access is occurring.
internal: sets handle->active_event to the first log entry and increases its access count.
LOGR_LogEventNext[edit | edit source]
internal: sets handle->active_event to the next log entry - decreasing the current one's access count and increasing the next's access count
LOGR_LogEventDelete[edit | edit source]
Deletes a log entry.
internal: deletes handle->active_event - or marks it for deletion if its access count > 0
LOGR_ReleaseLogEvents[edit | edit source]
Must be called with a handle obtained with LOGR_ObtainLogEvents. decreases the handle->active_event's access count, and frees the per caller handle.