log()
Output a message in the query response and return null
.
Description
The log()
method outputs message to the query response in the
summary
field.
The message template is:
info at *<source>*:<line>: <message>
where:
Field | Description | ||||||
---|---|---|---|---|---|---|---|
|
Message source.
|
||||||
|
Line number where |
||||||
|
String-serialized |
Examples
Include messages and variable values in the query response:
log("Before assignment")
let x = 5
let y = { lat: 37.5542782, long: -122.3007394 }
log("After assignment x=#{x}")
log(y)
x
info at *query*:1: Before assignment
info at *query*:4: After assignment x=5
info at *query*:5: { lat: 37.5542782, long: -122.3007394 }
5
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!