log
The log tag generates a log object.

Syntax

This tag has several usage styles, each style resulting in a valid action object.

Block syntax

Liquid
JSON
{% log %}
{
"foo": "bar"
}
{% endlog %}
{
"log": {
"foo": "bar"
}
}

Tag syntax, single argument

Liquid
JSON
{% log "foobar" %}
{
"log": "foobar"
}

Tag syntax, mapped arguments

Liquid
JSON
{% assign details = hash %}
{% assign details["foo"] = "bar" %}
​
{% log message: "Something to remember", details: details %}
{
"log": {
"message": "Something to remember",
"details": {
"foo": "bar"
}
}
}
Last modified 1yr ago
Copy link
Edit on GitHub
On this page
Syntax
Block syntax
Tag syntax, single argument
Tag syntax, mapped arguments