liveBook · Manning

*print-level*

As explained in Clojure: The Essential Reference

*print-level* is a Clojure dynamic variable specifying the maximum nesting depth to print.

*print-level* is a Clojure dynamic variable that limits how many nested collection levels printing functions display. Its default is nil, meaning no configured nesting limit; binding it locally keeps deeply nested output manageable. section 23.20

Limit nested output

Combine *print-level* with *print-length* when inspecting a large structure: (binding [*print-length* 3 *print-level* 4] (pprint document)) The output keeps only three items per collection and four nesting levels. Truncated collection items appear as …, while truncated nested branches appear as #.

How Clojure: The Essential Reference covers it

How deep it goes
Defines nesting truncation and shows local binding alongside *print-length*, without detailing printer internals.
Examples
Uses a parsed RSS document to demonstrate four-level nesting limits and visibly truncated nested branches.
What you can do after
Apply it via binding to produce bounded, more readable output from deeply nested collections.
How it connects
Connects *print-level* with *print-length*, pprint, dynamic variables, and collection printing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Clojure: The Essential Reference. The section links point to the parts of the book it draws on.