logging.aug diagrams
Function and constructor middleware
Project overview · Compiled explanation
Class interactions
Mermaid source
flowchart TD
n0["Console"]
n1["ConsoleLogger"]
n2["Logger"]
n1 -->|"calls write; depends on"| n0
n1 -->|"implements"| n2
n2 -->|"depends on"| n0
Sequences
Call arrows identify checked targets; loop and branch frames determine when they run. Open that target’s module to follow its implementation. Branches describe alternatives; loops describe repeated work. Native calls and interface dispatch stop at their declared contracts. Exit notes end that path; enclosing recovery and cleanup remain visible.
Logger.log
It takes message as a string (Text to display). It gets console (Console) from dependency injection.
It can call Console.write.
Interface contract; implementation selected at runtime. Explanation.
ConsoleLogger constructor
Console logger shared by interceptor instances and the application. It implements Logger.
ConsoleLogger.log
It takes message as a string. It gets console (Console) from dependency injection.
It can call Console.write.
Mermaid source
sequenceDiagram
participant p0 as ConsoleLogger.log
participant p1 as console: Console
p0->>p1: write(value=message) · interface dispatch
Called contracts
- Console — august/io/contracts.aug
- Console.write — august/io/contracts.aug
- Logger — logging.aug