Configuration
Configure LogNorth for your environment
Configuration
Section titled “Configuration”Configure LogNorth for your environment.
Server Configuration
Section titled “Server Configuration”Environment variables for the LogNorth server:
| Variable | Description | Default |
|---|---|---|
LICENSE_KEY | Your LogNorth license key | Required |
PORT | HTTP port | 3000 |
DATA_DIR | Data directory | /data |
LOG_LEVEL | Logging level (debug, info, warn, error) | info |
Email Alerts
Section titled “Email Alerts”Configure SMTP in the LogNorth settings page to receive email alerts for new errors.
| Setting | Description |
|---|---|
| SMTP Host | Your SMTP server (e.g., smtp.gmail.com) |
| SMTP Port | Usually 587 (TLS) or 465 (SSL) |
| SMTP Username | Your email or SMTP username |
| SMTP Password | Your email password or app password |
| From Address | Sender email address |
| To Address | Where to send alerts |
API Authentication
Section titled “API Authentication”Every API request requires an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYCreate API keys in the LogNorth web UI under Settings.
Event Schema
Section titled “Event Schema”Events must include a message field. Everything else is optional:
{ "message": "POST /users → 201", "timestamp": "2024-01-15T10:30:00Z", "context": { "method": "POST", "path": "/users", "status": 201, "duration_ms": 45, "user_id": 123, "ip": "1.2.3.4", "error": "Something went wrong" }}Error Detection
Section titled “Error Detection”LogNorth automatically sets is_error = true when:
context.errorexists and is not empty, ORcontext.status >= 500
No need to manually flag errors.
Data Retention
Section titled “Data Retention”Events are stored indefinitely by default. Configure retention in Settings.