Skip to main content


Summary: Call to print or trace function

Category: Testing


package policy

import future.keywords.contains
import future.keywords.if

reasons contains sprintf("%q is a dog!", []) if {
some user in input.users
user.species == "canine"

# Useful for debugging, but leave out before commiting
print("user:", user)


The print function is really useful for development and debugging, but should normally not be included in production policy. In order to be as useful for debugging purposes as possible, some performance optimizations are disabled when print calls are encountered. Prefer decision logging in production.

The trace function serves no real purpose since the introduction of print, and should be considered deprecated.

Configuration Options

This linter rule provides the following configuration options:

# one of "error", "warning", "ignore"
level: error


If you think you've found a problem with this rule or its documentation, would like to suggest improvements, new rules, or just talk about Regal in general, please join us in the #regal channel in the Styra Community Slack!