Logging
CMS uses the Fastify logging system.
Through the API /logger-file/
/logger-file/error/2024-01-01.log
General description
Section titled “General description”{ // 10:trace, 20:debug, 30:info, 40:warn, 50:error, 60:fatal, "level":30, "time":"2024-10-14T07:11:56.018Z", "pid":15100, "hostname":"GIS-022", "reqId":"req-1", "msg":"incoming request" ,
// if request "req":{ "method":"GET", "url":"/", "ip":"127.0.0.1", "params":{"*":"/"}, "query":{} },
// only for errors "res":{"statusCode":500}, "err":{ "type":"ReferenceError", "message":"d is not defined", "stack":"ReferenceError:" }}
File structure
Section titled “File structure”├── auth├── cms├── cron├── crud├── error
├── 2024-01-01.log # all error ├── 2024-01-01_DataBaseError.log # error by type ├── 2024-01-01_500.log # error by code
├── info├── init├── metric├── migration├── policy├── timeout├── warn
Configuration
Section titled “Configuration”{ "logDir": "/data/local/log", // default config.json dir + log "errorMessage":{ "500": "ServerError", "601": "Data integrity violation", }, "log": { "dir": "log", // default log "interval": "1d", // default 1d "compress": "gzip", // default gzip "maxFiles": 90 // default 90 }, "local": true // show error in API}
All parameters are optional