Appearance
Logging
Squizy provides a structured logging system that captures HTTP request/response details for all entity operations.
How It Works
The SquizyLoggingFilter intercepts all HTTP requests to entity endpoints and logs:
- Request: URI, HTTP method, headers, body
- Response: status code, headers, body
- Metadata: user email, total processing time in milliseconds
Log level rules:
- Successful requests:
INFOorDEBUGbased on configuration - Error responses (status ≥ 300): always logged at
ERRORlevel
Configuration
Default Logged Actions
Configure which operations are logged at INFO level for all entities:
properties
squizy.logging.default-logged-actions=CREATE,UPDATE,DELETEAllowed values: READ, CREATE, UPDATE, DELETE. By default, no actions are logged at INFO level — everything goes to DEBUG.
Per-Entity Log Level
Override the default for specific entities:
properties
# Log all operations for orders at INFO level
squizy.logging.entity-logged-actions.order=READ,CREATE,UPDATE,DELETE
# Only log deletes for products
squizy.logging.entity-logged-actions.product=DELETEThe entity name is the lower-case version of the entity class name as registered by Squizy.
Ignored Paths
Certain paths can be excluded from logging entirely:
properties
squizy.server.logging-ignored-paths=/actuator/health,/actuator/prometheusBy default, the following paths are excluded:
| Path | Reason |
|---|---|
/actuator/health | Health check endpoint (called frequently by orchestrators) |
/actuator/prometheus | Metrics scraping endpoint (called frequently by monitoring tools) |
Log Format
Squizy uses structured logging via Logstash Logback Encoder:
json
{
"message": "Request registered",
"user": "[email protected]",
"request": {
"uri": "http://localhost:8080/api/product",
"method": "POST",
"headers": { "content-type": "application/json" },
"body": "{\"reference\":\"AB-001\",\"name\":\"Headphones\"}"
},
"response": {
"status": 200,
"headers": {},
"body": "{...}"
},
"totalMilliseconds": 42
}