Section 52.2 Emitting a Message from Python
The shared logger provides one method per severity.
log.debug log.info log.fallback log.warning
log.error log.bug log.fatal
All but the last simply record a message and return.
log.fatal records the message and then raises PreTeXtFatal, so the build stops. Raising is the only way to signal a halt, which is what guarantees that “fatal” always means “halt.”A defect that cannot be worked around is the rare composition of the two—record it as a bug, then stop.
log.bug("an impossible case was reached")
log.fatal("so the build cannot continue")
