Console log

Write each incoming value to the Console panel with a level and label, rate-limited.

  • Debug
  • Since 0.2.0
  • console
  • log
  • debug
  • print
  • inspect
  • data

Open in TuneToys

Console log as the Patch draws it, at default values: inlets on the left, outlets on the right.

Console log prints every value it receives to the Console panel, with a level and a short label, so you can see what flows through a data chain.

What it does#

Each message on value becomes one Console line: the time, the level, the node's label and the value rendered as text (long values are cut at 4 KiB). With trigger cabled, the node logs the newest value only when the trigger fires.

Lines go to a bounded console ring in the host (5 000 entries); nothing is logged from the audio thread. The Console panel filters by level and node, searches, pauses and copies. Its sinks can download a .log file, and in Chromium write to a folder you choose.

When to use it#

Use it while building: put one after a Web request to see the response, after Convert to check a JSON pointer, or on a request's error output to catch refusals.

Ports#

PortDirectionSignalLanes
valueInputData (any)1
triggerInputData (trigger)1

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
levelLevel0 to 31linearSeverity shown in the Console and used by file sinks. Choices: 0 Debug, 1 Info, 2 Warn, 3 Error.
rateRate1 to 100020/slinearMost lines written per second; extra values are counted, not logged.
  • label: text.

Level (level)#

Debug, Info, Warn or Error. It colours the line, lets the Console filter it, and decides which file a split-by-severity sink writes it to.

Rate (rate)#

The most lines written per second, 1 to 1 000 (20 by default). Extra values are counted and reported in one notice instead of flooding the Console.

Label#

The label text field (up to 32 characters) prefixes each line. Clicking the prefix in the Console selects the node in the Patch.

Tips#

  • Use the Error level on error outputs so problems stand out.
  • A Console log changes nothing else; remove it when you are done or keep it as documentation.

See also#

Web request, Convert, Cron, Data cables.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. Log the time

beginner Teaches: level, rate

Cron sends its time JSON every two seconds; Console log writes it to the Console panel.

Patch: Cron time output connected to Console log value input.
Connections as text
  • Cron time output connected to Console log value input
  • Level sets the colour and filter group in the Console; Label prefixes each line.
  • Rate caps lines per second; extra values are counted, not written.
Frame preview: Log the timeFrame “Log the time” with 2 elements: text heading, text hint.LOG THE TIMEPress Play and open the Console panel (View → Console). A line arrives every tw…
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Cron Fire a trigger on an interval, a cron expression or musical beats, with the time as JSON.
  • Web request Fetch a URL on each trigger under the network allowlist; secrets come from a vault slot, never the Toy.
  • Convert Convert a value to another datatype, optionally picking a field or formatting a string; failures go to error.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close