Open dheadrick1618 opened 9 months ago
Great work! I think we should include the definition of each log severity for clarification, such as:
I think the next step is to make a small working example / demonstration program that scrapes various logs and consolidates them, so a simple GS command can request all this log info in a simple manner. Thoughts?
Yeah, I agree. But I have one question. Should we try to reuse syslog before moving to making a custom implementation of the log server process?
Description
Task is to get logging working on the FSW. Need to determine how the system should log, and how this could be accessed by the ground station.
Deliverables
Research
Typical Linux use case
dmesg
./dev/kmsg
. This file has access to the ring buffer structure that holds the log./proc/kmsg
./dev/kmsg
acts like an entry point to the ring buffer, since you are able to both read and write to it./proc/kmsg
is only for reading since it is not an entry point to the ring buffer.syslog
protocol./var/log
directory.rsyslog
andsystemd-journal
.rsyslog
makes permanent log in the/var/log
directorysystemd-journal
keeps a temp log unless configured otherwise.journalctl
to access the content./run/log/journal
directory.logger
is a built in utility that will send strings to a syslog server.Embedded readings
printf
is expensive, so logging should maybe be deferred.The thing is, we are working with Linux, so we should be able to leverage the socket design paradigm to let the operating system do the scheduling work for us.
Figures
emerg
alert
crit
err
warning
notice
info
debug
The table above is the list of priorities in the syslog standard.
Resources