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
1
{% log %}
2
{
3
"foo": "bar"
4
}
5
{% endlog %}
Copied!
1
{
2
"log": {
3
"foo": "bar"
4
}
5
}
Copied!

Tag syntax, single argument

Liquid
JSON
1
{% log "foobar" %}
Copied!
1
{
2
"log": "foobar"
3
}
Copied!

Tag syntax, mapped arguments

Liquid
JSON
1
{% assign details = hash %}
2
{% assign details["foo"] = "bar" %}
3
​
4
{% log message: "Something to remember", details: details %}
Copied!
1
{
2
"log": {
3
"message": "Something to remember",
4
"details": {
5
"foo": "bar"
6
}
7
}
8
}
Copied!
Last modified 1yr ago