ServerLog
Stored in the serverlogs collection. createdAt and updatedAt are maintained automatically.
Returned by GET /logs.
Example
One real ServerLog as returned by GET /logs, taken from the data array. Recorded from a live response, so the defaults, denormalised snapshots and populated fields are the actual ones:
{
"_id": "6a96766dd7866f8745120638",
"level": "info",
"message": "GET /api/key/protected/logs?n=1",
"timestamp": "2026-09-01T06:53:33.920Z",
"meta": {
"query": {
"n": "1"
},
"location": "Location Not Found",
"userAgent": "node",
"source": {
"os": "Other 0.0.0",
"device": "Other 0.0.0",
"browser": "Other 0.0.0"
}
},
"isAdminLog": false,
"ip": "127.0.0.1",
"method": "GET",
"url": "/api/key/protected/logs?n=1",
"createdAt": "2026-09-01T06:53:33.922Z",
"updatedAt": "2026-09-01T06:53:33.922Z",
"__v": 0
}
:::note Trimmed for reading A populated reference is shown by the fields that identify it rather than in full — it arrives as the entire referenced document. Long arrays are cut to the first two entries and marked, long strings are truncated, and any field that could carry a credential is dropped rather than masked. :::
Fields
| Field | Type | Notes |
|---|---|---|
level | string | required |
message | string | required |
timestamp | date | default now |
meta | any | |
adminUser | ObjectId -> Admin | |
user | ObjectId -> User | |
member | ObjectId -> Member | |
company | ObjectId -> Company | |
isAdminLog | boolean | default false |
apiKey | ObjectId -> Api | |
ip | string | |
method | string | |
url | string | |
statusCode | number | |
stack | string | |
requestBody | any | |
createdBy | ObjectId -> Member | |
updatedBy | ObjectId -> Member | |
createdByAdmin | ObjectId -> Admin | |
updatedByAdmin | ObjectId -> Admin | |
status | string | one of success, failure |
reason | string | |
_id | ObjectId | |
createdAt | date | set once |
updatedAt | date |