Skip to main content
The logging system lives in source/utils/Logger.brs and provides three functions with distinct severity levels and different print conditions.

Logging functions

GTV_Log — debug (dev builds only)

GTV_Log is compiled out entirely when IS_DEV_BUILD = false. The #if / #end if block is a BrightScript compile-time conditional — no runtime check, no overhead in production builds. Used for: normal flow tracing, event samples, parsed counts, and anything you only need during development. Example output:

GTV_Warn — warnings (always printed)

GTV_Warn always prints regardless of the IS_DEV_BUILD flag. Used for recoverable issues: auth retry logic, server failover, skipped parser entries, connectivity state transitions, and session check deferrals. Example output:

GTV_Error — errors (always printed)

GTV_Error always prints. Used for unrecoverable failures: handshake failure, no reachable server, HTTP request errors. Example output:

GTV_LayoutPrint — layout diagnostics

A special diagnostic print function defined in AppConstants.brs, used when LAYOUT_DIAG = true:
Note that GTV_LayoutPrint always uses the [GTV][WARN][LayoutDiag] prefix and prints at warn level so it appears even in production builds when enabled. It is gated by the LAYOUT_DIAG flag in AppConstants, not by IS_DEV_BUILD. Example output:

Log level summary


Enabling dev logging

Dev logging is controlled by the IS_DEV_BUILD bs_const in the manifest file:
To enable GTV_Log output, change this to:
Then rebuild and sideload:
Setting IS_DEV_BUILD=true increases log volume significantly. Every channel sample, every HTTP response code, every layout recalculation, and every ad poll result is printed. This can affect render-thread performance on lower-end Roku devices. Use dev builds only during development, not for channel submission packages.
Combine make install with a live telnet session so you see logs immediately as the app starts:
Edit IS_DEV_BUILD=true in manifest before running make install. Remember to revert to false before creating a Channel Store package.

Viewing logs

Roku exposes the BrightScript debug console over Telnet on port 8085.
All print statements from the channel — including GTV_Log, GTV_Warn, and GTV_Error — appear here in real time.
1

Put the Roku in developer mode

Navigate to the Roku home screen and enter the developer mode sequence: Home × 3, Up × 2, Right, Left, Right, Left, Right. Enable the developer web server and note your device password.
2

Find the Roku's IP address

On the Roku: Settings → Network → About. Note the IP address shown.
3

Open the debug console

You should see a blank console. Relaunch the channel on the Roku — output appears immediately.
4

Sideload with dev logging enabled

To enable verbose GTV_Log output, set IS_DEV_BUILD=true in the manifest first:
manifest
Then sideload:
Remember to revert to IS_DEV_BUILD=false before building a Channel Store package.

Diagnostic flags in AppConstants

Beyond IS_DEV_BUILD, three flags in AppConstants.brs enable additional diagnostic output at runtime (they can be toggled without changing IS_DEV_BUILD): All three print at the GTV_Warn level so they appear in both dev and production console sessions.