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
- inspect
- data
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#
| Port | Direction | Signal | Lanes |
|---|---|---|---|
value | Input | Data (any) | 1 |
trigger | Input | Data (trigger) | 1 |
Parameters#
| Parameter | Label | Range | Default | Unit | Scale | Notes |
|---|---|---|---|---|---|---|
level | Level | 0 to 3 | 1 | linear | Severity shown in the Console and used by file sinks. Choices: 0 Debug, 1 Info, 2 Warn, 3 Error. | |
rate | Rate | 1 to 1000 | 20 | /s | linear | Most 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
erroroutputs 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.
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.
Related nodes
- 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.