The Watchful Eye (Observer)
A one-to-many dependency so that when a line changes state, all its dependents are notified.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Observer
ARCANUM SCHOOL: Transmutation // Streamweaving
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
# Observer: Writing to multiple output files or logs upon an event
/CRITICAL_FAILURE/ {
# Notify observer 1 (log file)
w /tmp/critical_log.txt
# Notify observer 2 (admin alert pipe)
w /dev/tty
# Modify the stream as usual
s/.*/[RESOLVED] &/
}
Runic Tags:
#sed
#behavioral
#observer