1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-21 23:57:40 +02:00
Files
OpenIntegrations/docs/en/md/Addons/Melezh/Start/Logging.mdx
Vitaly the Alpaca (bot) 88b8602ed8 Main build (Jenkins)
2025-06-03 20:21:22 +03:00

48 lines
2.1 KiB
Plaintext
Vendored

---
id: Logging
title: Logging system
sidebar_position: 5
---
This section describes the configuration and usage of Melezh's built-in logging system.
## Incoming request logging
By default, new Melezh projects have **logging** enabled - collecting and storing information about incoming requests and responses. Logs are saved as separate files in a specific directory structure.
The default log directory is located at `temp/Melezh/<Project Random UUID>`. You can find or modify this path either through the web interface settings panel or via console commands.
The log directory hierarchy is organized as follows:
+ Handler directory
+ Date directory (stores logs for a specific day)
+ Request-specific directory
Log files are only stored in request-specific directories, while other levels contain only nested subdirectories.
## Log file format
Each request directory may contain the following file types:
+ `req.info` - JSON file with core event information (timestamp, HTTP method, URL parameters, etc.)
+ `req.body` - JSON file containing the request body (original JSON for `application/json` requests or converted JSON for `form-data`)
+ `req.header` - JSON file with request headers
+ `res.body` - Response body returned by Melezh
+ Any number of additional files from `multipart/form-data` requests
The specific files created depend on the request type and logging configuration settings.
## Logging configuration
Melezh provides several logging options to control storage location and content:
+ **logs_path** - Log storage directory. Set empty to disable logging
+ **logs_req_headers** - Enable/disable request header logging
+ **logs_req_body** - Enable/disable request body logging
+ **logs_req_max_size** - Maximum request body size to log (in bytes). 0 = unlimited
+ **logs_res_body** - Enable/disable response body logging
+ **logs_res_max_size** - Maximum response body size to log (in bytes). 0 = unlimited
:::tip
Direct file system access to logs may be inconvenient. For viewing events and searching specific requests, we recommend using the built-in web interface log viewer (see *Web Interface* section).
:::