ides_printer (ides v0.2.0)

View Source

Formatting and rendering for ides supervision trees.

Summary

Functions

Render the supervision tree as indented ASCII text. The target process is marked with *. Indentation is 4 spaces per level.

Like format/2 but also includes a section showing link and monitor relationships below the tree.

Like format/2 but writes the rendered tree to stdout.

Functions

format(TargetPid, Tree)

-spec format(TargetPid :: pid(), Tree :: ides_family:process()) -> iolist().

Render the supervision tree as indented ASCII text. The target process is marked with *. Indentation is 4 spaces per level.

Rendering rules:

  • Root supervisor: name (strategy)
  • Supervisor child: name (strategy, restart_type)
  • Worker child: name (restart_type)
  • Target process: prefixed with *

format_detail(TargetPid, Tree, KillSources)

-spec format_detail(TargetPid :: pid(),
                    Tree :: ides_family:process(),
                    KillSources :: [ides_family:kill_source()]) ->
                       iolist().

Like format/2 but also includes a section showing link and monitor relationships below the tree.

KillSources is the result of ides_march:kill_graph_detail/1.

print(TargetPid, Tree)

-spec print(TargetPid :: pid(), Tree :: ides_family:process()) -> ok.

Like format/2 but writes the rendered tree to stdout.