✨ ARCANUM RUNE DIFFICULTY: Adept Behavioral

The Sequential Sigils (Chain of Responsibility)

Passing a line through a chain of processing scripts until one handles it.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Chain of Responsibility
ARCANUM SCHOOL: Transmutation // Streamweaving
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
# Chain of Responsibility: Test patterns, branch on success to avoid further processing
/^DEBUG:/ {
  s/^DEBUG:/[Level: DEBUG]/
  b handled
}
/^WARN:/ {
  s/^WARN:/[Level: WARN]/
  b handled
}
/^ERROR:/ {
  s/^ERROR:/[Level: ERROR]/
  b handled
}

:handled
# Exit or continue after being handled by the chain
p
d
Runic Tags: #sed #behavioral #chain-of-responsibility