Log
Represents a server log entry.
This object can be configured from the WebUI under Management › Observability › Logs
Fields
timestamp
Type:
UTCDateTime· requiredTimestamp of the log entry
level
Type:
TracingLevel· requiredSeverity level of the log entry
event
Type:
EventType· requiredEvent type of the log entry
details
Type:
Text· requiredLog message
JMAP API
The Log object is available via the urn:stalwart:jmap capability.
x:Log/get
This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysLogGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Log/get",
{
"ids": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:Log/set
This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
Supports create, update, and destroy operations in a single call.
Create
This operation requires the sysLogCreate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Log/set",
{
"create": {
"new1": {
"details": "Example",
"level": "error",
"timestamp": "2026-01-01T00:00:00Z"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Update
This operation requires the sysLogUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Log/set",
{
"update": {
"id1": {
"details": "updated value"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Destroy
This operation requires the sysLogDestroy permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Log/set",
{
"destroy": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:Log/query
This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysLogQuery permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Log/query",
{
"filter": {
"text": "example"
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
The x:Log/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):
| Condition | Kind |
|---|---|
text | text |
CLI
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
Fetch
stalwart-cli get log id1
Create
stalwart-cli create log \
--field timestamp=2026-01-01T00:00:00Z \
--field level=error \
--field details=Example
Query
stalwart-cli query log
stalwart-cli query log --where text=example
Update
stalwart-cli update log id1 --field description='Updated'
Delete
stalwart-cli delete log --ids id1
Enums
TracingLevel
| Value | Label |
|---|---|
error | Error |
warn | Warning |
info | Info |
debug | Debug |
trace | Trace |