# log

Source: https://zotonic.com/docs/2000/log

URI: https://zotonic.com/id/2000

Language: en



Model for runtime logging state and access to server log entries for clients allowed to read logs.

Available Model API Paths
-------------------------

| Method | Path pattern                 | Description                                                                      |
| ------ | ---------------------------- | -------------------------------------------------------------------------------- |
| `get`  | `/is_log_client_allowed/...` | Return whether the current context may use the live log client channel (`mod_logging:is_log_client_allowed/1`). |
| `get`  | `/is_log_client_session/...` | Return whether this session is registered as a log-client session (`mod_logging:is_log_client_session/1`); access denied when log-client use is not allowed. |
| `get`  | `/is_log_client_active/...`  | Return whether live log-client streaming is currently active for this context (`mod_logging:is_log_client_active/1`); access denied when log-client use is not allowed. |
| `get`  | `/`                          | Return all log rows ordered newest-first, with decoded `props` merged into each row; requires `use` permission on `mod_logging`. No further lookups. |
| `get`  | `/+index/...`                | Return log row with id `+index` from table `log` (or `undefined` if missing); requires `use` permission on `mod_logging`. |

`/+name` marks a variable path segment. A trailing `/...` means extra path segments are accepted for further lookups.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2000?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2000?language=en>)
