Skip to content

UI.Console

Name Mandatory Description Default Type
⬅️ Input The raw logs. String
Output ➡️ The output of this shard will be its input. String
ShowFilters No Whether to display filter controls. false Bool
Style No The console style. none {Any}Var({Any})

A console with formatted logs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@wire(capture {
  CaptureLog(
    Size: 24
    MinLevel: "info"
    Pattern: "%^[%l]%$ [%Y-%m-%d %T.%e] %v"
    Suspend: true
  )
  String.Join > logs
  Math.Inc(generation)
} Looped: true)

@wire(ui-wire {
  Once {
    "" | Set(logs Global: true)
    0 | Set(generation Global: true)
    Detach(capture)
  }

  UI.BottomPanel(
    Contents:
    {Get(generation Global: true)
      ToString | UI.Label
    }
  )
  UI.CentralPanel(
    Contents:
    {UI.Button("Say Hello" Msg("Hello!"))
      Get(logs Global: true)
      UI.Console(ShowFilters: true)
    }
  )
} Looped: true)

{ui-behavior: ui-wire}


 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
@wire(ui-wire {
  UI.Window(
    Position: @f2(0 0)
    Anchor: Anchor::Center
    Width: 200
    Height: 200
    Flags: [WindowFlags::NoResize]
    Contents: {
      UI.Button("Say Hello" Msg("Hello!"))
      CaptureLog(
        Size: 24
        MinLevel: "info"
        Pattern: "%^[%l]%$ [%Y-%m-%d %T.%e] %v"
      )
      String.Join
      UI.Console
    }
  )
} Looped: true)

{ui-behavior: ui-wire}