Complete configuration reference for Reframe v3.1.1.
- Overview
- Configuration Files
- Server Configuration
- Logging Configuration
- API Documentation Configuration
- Package Configuration
- Environment Variables
- Configuration Priority
- Examples
Reframe v3.1.1 uses a flexible configuration system that supports multiple sources with a clear priority hierarchy. Configuration can be provided through:
- Environment Variables (highest priority)
- reframe.config.json file
- Built-in Defaults (lowest priority)
This approach provides flexibility for different deployment environments while maintaining sensible defaults for development.
The main configuration file located in the project root directory. This file is optional - if not present, Reframe will use built-in defaults.
Location: ./reframe.config.json
Format: JSON
Example:
{
"packages": [
{
"path": "../reframe-package-swift-cbpr",
"enabled": true
}
],
"server": {
"host": "0.0.0.0",
"port": 3000,
"runtime": {
"tokio_worker_threads": "auto",
"thread_name_prefix": "reframe-worker"
}
},
"logging": {
"format": "compact",
"level": "info"
},
"api_docs": {
"enabled": true,
"title": "Reframe API"
},
"defaults": {
"package_path": "../reframe-package-swift-cbpr"
}
}Package configuration file located in each workflow package directory. This defines the package metadata, workflows, and scenarios.
Location: <package-path>/reframe-package.json
Format: JSON
Example:
{
"id": "swift-cbpr-mt-mx",
"name": "SWIFT CBPR+ MT <-> MX Transformations - SR2025",
"version": "2.0.0",
"description": "Official SWIFT CBPR+ transformations",
"author": "Plasmatic Team",
"license": "Apache-2.0",
"engine_version": "3.1.1",
"required_plugins": ["swift-mt-message", "mx-message"],
"workflows": {
"transform": {
"path": "transform",
"description": "Unified bidirectional transformation workflows",
"entry_point": "index.json"
},
"generate": {
"path": "generate",
"description": "Sample message generation",
"entry_point": "index.json"
},
"validate": {
"path": "validate",
"description": "Message validation workflows",
"entry_point": "index.json"
}
},
"scenarios": {
"path": "scenarios",
"description": "Test scenarios",
"entry_point": "index.json"
}
}Controls HTTP server behavior and runtime characteristics.
| Field | Type | Default | Description |
|---|---|---|---|
host |
string | "0.0.0.0" |
Bind address for HTTP server |
port |
number | 3000 |
Port number for HTTP server |
runtime |
object | See below | Tokio runtime configuration |
| Field | Type | Default | Description |
|---|---|---|---|
tokio_worker_threads |
string | "auto" |
Number of Tokio worker threads ("auto" or specific number) |
thread_name_prefix |
string | "reframe-worker" |
Prefix for worker thread names |
Example:
{
"server": {
"host": "127.0.0.1",
"port": 8080,
"runtime": {
"tokio_worker_threads": "8",
"thread_name_prefix": "reframe-prod"
}
}
}Notes:
- Setting
hostto"0.0.0.0"allows connections from any network interface - Setting
hostto"127.0.0.1"restricts connections to localhost only tokio_worker_threadsof"auto"uses the number of CPU cores- Explicit thread count useful for resource-constrained environments
Controls application logging behavior including format, level, and output destinations.
| Field | Type | Default | Description |
|---|---|---|---|
format |
string | "compact" |
Log format: "compact", "full", "pretty", or "json" |
level |
string | "info" |
Log level: "error", "warn", "info", "debug", "trace" |
show_target |
boolean | false |
Show module target in logs |
show_thread |
boolean | false |
Show thread name/ID in logs |
show_file_location |
boolean | false |
Show file and line number |
show_span_events |
boolean | false |
Show span enter/exit events |
file_output |
object | See below | File logging configuration |
| Field | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | false |
Enable file logging |
directory |
string | "./logs" |
Directory for log files |
file_prefix |
string | "reframe" |
Prefix for log file names |
rotation |
string | "daily" |
Rotation strategy: "daily", "hourly", "never" |
Example - Development:
{
"logging": {
"format": "pretty",
"level": "debug",
"show_target": true,
"show_file_location": true
}
}Example - Production:
{
"logging": {
"format": "json",
"level": "info",
"show_target": false,
"file_output": {
"enabled": true,
"directory": "/var/log/reframe",
"file_prefix": "reframe-prod",
"rotation": "daily"
}
}
}Log Levels:
error: Only errorswarn: Warnings and errorsinfo: General information (recommended for production)debug: Detailed debugging informationtrace: Extremely verbose, includes dataflow-rs internals
Controls OpenAPI/Swagger documentation generation and display.
| Field | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | true |
Enable API documentation endpoints |
title |
string | "Reframe API" |
API title in documentation |
version |
string | "3.1.1" |
API version (from Cargo.toml) |
description |
string | See below | API description |
contact |
object | See below | Contact information |
license |
object | See below | License information |
external_docs_url |
string | See below | External documentation URL |
server_url |
string | "http://localhost:3000" |
API server URL |
Default Description:
"Enterprise-grade bidirectional SWIFT MT ↔ ISO 20022 transformation service"
| Field | Type | Default | Description |
|---|---|---|---|
name |
string | "Plasmatic Team" |
Contact name |
email |
string | "enquires@goplasmatic.io" |
Contact email |
| Field | Type | Default | Description |
|---|---|---|---|
name |
string | "Apache 2.0" |
License name |
identifier |
string | "Apache-2.0" |
SPDX license identifier |
url |
string | See below | License URL |
Default License URL:
"https://opensource.org/license/apache-2-0"
Example - Custom Branding:
{
"api_docs": {
"enabled": true,
"title": "ACME Bank Transformation API",
"version": "1.0.0",
"description": "Internal SWIFT transformation service",
"contact": {
"name": "ACME IT Team",
"email": "it@acmebank.com"
},
"server_url": "https://api.acmebank.com/transform"
}
}Notes:
server_urlcan be overridden byAPI_SERVER_URLenvironment variable- When
enabledisfalse,/swagger-uiand/api-docs/openapi.jsonendpoints return 404 - The OpenAPI spec is generated at runtime based on configuration
Controls which workflow packages are loaded and their settings.
Array of package references to load at startup.
Package Reference Structure:
{
"path": "../reframe-package-swift-cbpr",
"enabled": true
}| Field | Type | Default | Description |
|---|---|---|---|
path |
string | Required | Relative or absolute path to package directory |
enabled |
boolean | true |
Whether to load this package |
Default package settings.
| Field | Type | Default | Description |
|---|---|---|---|
package_id |
string/null | null |
Default package ID to use (null = first loaded) |
package_path |
string | See below | Fallback package path if no packages configured |
Default Package Path:
"../reframe-package-swift-cbpr"
Example - Multiple Packages:
{
"packages": [
{
"path": "../reframe-package-swift-cbpr",
"enabled": true
},
{
"path": "/opt/reframe/packages/custom-transformations",
"enabled": true
},
{
"path": "../reframe-package-experimental",
"enabled": false
}
],
"defaults": {
"package_id": "swift-cbpr-mt-mx"
}
}Notes:
- If no packages are configured, falls back to
defaults.package_path - Packages are loaded in the order specified
- Disabled packages (
enabled: false) are skipped - Package validation occurs during loading
Environment variables override configuration file values, providing flexibility for deployment-specific settings.
| Variable | Type | Default | Description |
|---|---|---|---|
REFRAME_PACKAGE_PATH |
string | "../reframe-package-swift-cbpr" |
Path to default workflow package |
TOKIO_WORKER_THREADS |
number | CPU count | Number of Tokio async runtime worker threads |
API_SERVER_URL |
string | "http://localhost:3000" |
Override OpenAPI server URL |
RUST_LOG |
string | "info" |
Logging level and filters |
The RUST_LOG environment variable supports flexible filtering:
Simple Levels:
export RUST_LOG=error # Only errors
export RUST_LOG=warn # Warnings and errors
export RUST_LOG=info # General information
export RUST_LOG=debug # Debugging information
export RUST_LOG=trace # Very verboseModule-Specific Levels:
# Different levels for different modules
export RUST_LOG=info,reframe=debug
# Very verbose dataflow-rs, info for everything else
export RUST_LOG=info,dataflow_rs=trace
# Multiple module configurations
export RUST_LOG=warn,reframe::handlers=debug,dataflow_rs=traceProduction Examples:
# Minimal logging
export RUST_LOG=error
# Standard production
export RUST_LOG=info
# Debugging specific issues
export RUST_LOG=info,reframe::handlers=debugDevelopment Environment:
export REFRAME_PACKAGE_PATH=../reframe-package-swift-cbpr
export RUST_LOG=debug
export TOKIO_WORKER_THREADS=auto
cargo runProduction Environment:
export REFRAME_PACKAGE_PATH=/opt/reframe/packages/swift-cbpr
export API_SERVER_URL=https://api.production.com
export RUST_LOG=info
export TOKIO_WORKER_THREADS=16
./target/release/reframeDocker Environment:
docker run -d \
-e REFRAME_PACKAGE_PATH=/packages/swift-cbpr \
-e RUST_LOG=info \
-e TOKIO_WORKER_THREADS=8 \
-e API_SERVER_URL=https://api.example.com \
-v ./packages:/packages \
-p 3000:3000 \
reframe:latestConfiguration values are resolved using this priority order (highest to lowest):
-
Environment Variables (highest priority)
API_SERVER_URLREFRAME_PACKAGE_PATHTOKIO_WORKER_THREADSRUST_LOG
-
reframe.config.json
- All configuration sections
- Loaded from project root
- Optional file
-
Built-in Defaults (lowest priority)
- Hard-coded defaults
- Always available
Given this configuration:
reframe.config.json:
{
"server": {
"port": 8080
},
"logging": {
"level": "info"
}
}Environment:
export RUST_LOG=debugResolved Configuration:
- Port:
8080(from config file) - Log level:
debug(from environment variable, overrides config file) - Host:
"0.0.0.0"(built-in default, not specified elsewhere)
reframe.config.json:
{
"packages": [
{
"path": "../reframe-package-swift-cbpr",
"enabled": true
}
],
"server": {
"host": "127.0.0.1",
"port": 3000,
"runtime": {
"tokio_worker_threads": "auto"
}
},
"logging": {
"format": "pretty",
"level": "debug",
"show_target": true,
"show_file_location": true
},
"api_docs": {
"enabled": true,
"server_url": "http://localhost:3000"
}
}Run Command:
cargo runreframe.config.json:
{
"packages": [
{
"path": "/opt/reframe/packages/swift-cbpr-v2.0",
"enabled": true
}
],
"server": {
"host": "0.0.0.0",
"port": 3000,
"runtime": {
"tokio_worker_threads": "16"
}
},
"logging": {
"format": "json",
"level": "info",
"file_output": {
"enabled": true,
"directory": "/var/log/reframe",
"file_prefix": "reframe-prod",
"rotation": "daily"
}
},
"api_docs": {
"enabled": true,
"title": "Production Transformation API",
"server_url": "https://api.production.com"
}
}Environment Variables:
export RUST_LOG=info
export API_SERVER_URL=https://api.production.comRun Command:
./target/release/reframereframe.config.json:
{
"packages": [
{
"path": "/packages/swift-cbpr",
"enabled": true
}
],
"server": {
"host": "0.0.0.0",
"port": 3000,
"runtime": {
"tokio_worker_threads": "auto"
}
},
"logging": {
"format": "json",
"level": "info"
}
}docker-compose.yml:
version: '3.8'
services:
reframe:
image: reframe:3.1.1
ports:
- "3000:3000"
volumes:
- ./packages:/packages:ro
- ./config:/app/config:ro
- ./logs:/var/log/reframe
environment:
- RUST_LOG=info
- API_SERVER_URL=https://api.example.com
- TOKIO_WORKER_THREADS=8
restart: unless-stoppedIf no reframe.config.json is provided, Reframe uses these defaults:
{
"packages": [],
"server": {
"host": "0.0.0.0",
"port": 3000,
"runtime": {
"tokio_worker_threads": "auto",
"thread_name_prefix": "reframe-worker"
}
},
"logging": {
"format": "compact",
"level": "info",
"show_target": false,
"show_thread": false,
"show_file_location": false,
"show_span_events": false,
"file_output": {
"enabled": false
}
},
"api_docs": {
"enabled": true,
"title": "Reframe API",
"version": "3.1.1",
"description": "Enterprise-grade bidirectional SWIFT MT ↔ ISO 20022 transformation service",
"server_url": "http://localhost:3000"
},
"defaults": {
"package_id": null,
"package_path": "../reframe-package-swift-cbpr"
}
}With these defaults, Reframe will:
- Look for packages at
../reframe-package-swift-cbpr(or useREFRAME_PACKAGE_PATH) - Listen on
0.0.0.0:3000 - Use all available CPU cores for Tokio runtime
- Log at INFO level with compact format
- Enable API documentation at
/swagger-ui
Reframe validates configuration at startup and reports errors clearly:
Invalid Port:
Error: Invalid server port: 0 (must be 1-65535)
Missing Package:
Error: Package not found: /opt/reframe/packages/nonexistent
Invalid Package Configuration:
Error: Failed to load package from ../reframe-package-swift-cbpr:
Package configuration not found: ../reframe-package-swift-cbpr/reframe-package.json
Configuration changes to workflow files can be reloaded without restart:
curl -X POST http://localhost:3000/admin/reload-workflowsThis reloads:
- All workflow definitions from packages
- Scenario configurations
- Package metadata
Does NOT reload:
- Server configuration (host, port, runtime)
- Logging configuration
- API documentation settings
To apply server/logging changes, restart the service.
- Architecture Guide - Understanding the technical architecture
- Installation Guide - Setup and deployment instructions
- Message Formats - Supported message types