Browse API 1 documentation
grove.log()
Write a diagnostic to Mango's Grove Console.
Mango 3.1+View Markdown
Signature
ts
grove.log(message: string, level?: 'log' | 'info' | 'warn' | 'error' | 'debug'): void
Availability
All packaged runtimes. No capability required.
Parameters
| Parameter | Required | Description |
|---|---|---|
message |
Yes | Diagnostic text. The facade converts it with String. |
level |
No | Exact lower-case level; omitted or unknown values use log. |
Return value
Returns undefined.
Behavior and errors
Mango attributes output to the running instance in its local and global Grove consoles. Standard console methods and uncaught JavaScript errors are also captured. Keep tokens, keys, message bodies, and private response payloads out of diagnostics. This method provides no persistence or delivery acknowledgement.
Example
js
try {
await grove.secrets.application.get('service-token')
} catch {
grove.log('Could not read the service credential.', 'error')
}