Last active
March 19, 2019 13:53
-
-
Save bradbishop/4d6e55315017ac40fe95a27b6c7954f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application exception context phosphor-loggingd journald | |
+-----+ +-----+ +-----+ +-----+ | |
log event detected | | | | | | | | |
"producer" | | | | | | | | | |
| + | | | | | | | | |
+-------> | | | | | | | | | | |
| | | | | | | | | | | |
| elog() | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | +----------------------------------------------------------------------------------+ | | |
| | | | | | | | | | | |
| | | -> key value pairs, transaction ID -> | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | <----------------------------------------------------------------------------------< | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| phosphor logging | | | | | | | | | | |
| library | | | throw(T) | | | | | | | |
| | >-----------------------------+ | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | +--------------+ | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | +-----------------------------< | | | | | | |
| | | | catch(T) | | | | | | | |
| | | | | | | | | | | |
| commit() | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | >--------------------------+-----+-------------------------+ | | | | |
| | | private dbus api (commit(transaction id)) | | | | | | |
| | | | | | | | | | | |
+------> | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | +-----------------------+ | | |
| | | | | | | | + | | |
| | | | | | | find key value pairs(transaction ID) | |
| | | | | | | | | | | |
| | | | | <-----------------------+ | | |
| | | | | | | | | | |
| | | | | +-------------+ | | | |
| | | | | | | | | | | |
| | | | | | | instantiate Logging.Entry | |
| | | | | | | | | | | |
| | | | | <-------------+ | | | |
| | | | | | | | | | |
| | | | | v | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
+-----+ +-----+ +-----+ +-----+ | |
Glossary: | |
message id: an enumeration for a location in the codebase | |
message arguments: source of truth for event metadata, known only to the event producer | |
event metadata: the content of the logging format (pel, sel, etc) | |
phosphor-logging +1: | |
message arguments are compile-time checked | |
phosphor-logging -1: | |
dbus api is private ("internal") | |
leads developers to conflating logging with error handling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment