Skip to main content

Overview

Every query, command, and API call that flows through Formal is logged and stored for auditing, compliance, and security analysis. Formal’s log system provides comprehensive visibility into data access across your organization. Logs can come from Connectors, the Formal Endpoint, the Control Plane, or workflows. Formal console logs

What Gets Logged

Database Queries

Full SQL/NoSQL queries, execution time, rows affected

API Calls

HTTP requests, headers, request/response bodies, status codes

SSH Commands

Every command executed in SSH sessions

Kubernetes Exec

kubectl exec sessions and commands

Control Plane API Calls

Create, Read, Update, and Delete API calls made to the Control Plane

Log Enrichment

Formal automatically enriches each Connector log entry with contextual information: Control Plane API calls are enriched with the following information:

Accessing Logs

Navigate to Logs in the Formal console to view all logged activity.

Viewing Modes

Default view that displays all log entries chronologically.
  • See individual queries/commands
  • Click any row to open detailed panel
  • Filter and search across all fields
  • Click Export to download CSV or JSON

Aggregation Examples

Use Aggregations to answer common operational and security questions:
Combine aggregation with time range filters to compare patterns across periods — for example, compare this week’s query volume to last week’s to spot anomalies.

Log Details Panel

Click any log entry to view comprehensive details: Log details panel

What’s Included

  • Full Query/Command: Complete text of what was executed
  • User Context: User, end-user, groups, email
  • Resource Information: Database, hostname, port, technology
  • Policy Evaluation: Which policies evaluated, actions taken, reasons
  • Performance Metrics: Duration, rows affected, data transferred
  • Network Information: Client IP, application, connection details
  • Session Link: Jump to associated session recording

Log Schema Reference

Every log entry follows a structured schema with nested fields. You can query any of these fields using Quickwit syntax.

Event and Session Fields

User Fields

Resource Fields

Request and Response Fields

Policy Fields

Connector and Space Fields

Control Plane Fields

Device Fields

Formal uses Quickwit query engine for powerful search capabilities.

Basic Filters

Use the sidebar to filter by:
  • Source — Connector, Control Plane, Workflow, or Desktop
  • Connector
  • Resource
  • User
  • End-user
  • Group
  • Technology (postgres, ssh, http, etc.)
  • Time range
Source selects which log stream to search. Connector is the default. Desktop covers traffic from the Formal Endpoint, such as LLM resources. Log configurations also use a Source field (Connector or Desktop); see Logs Configuration. Write Quickwit queries for complex searches:

Query Templates

Formal provides pre-built query templates:

Query Library

Query actions Access your queries from the Logs toolbar:
  • Recent queries: Click the clock icon to reopen recent searches
  • Saved Queries: Open the query library (Templates and Saved tabs)

Recent Queries

View your search history:
  1. Click the clock icon next to Saved Queries
  2. Select any previous query to re-run it
  3. History persists across sessions

Saved Queries

Save frequently used queries for quick access:
  1. Create your query with filters or search terms
  2. Click Save Query in the toolbar
  3. Name your query
  4. Access later from Saved QueriesSaved

Template Queries

Pre-built queries for common use cases. Click Saved QueriesTemplates to browse available templates (see Query Templates above)

Exporting Logs

CSV Export

Export search results to CSV for offline analysis:
  1. Apply filters or search query
  2. Click Export
  3. Choose CSV (or JSON), then download the file

Log Integration

Forward all logs to external systems:
  • AWS S3: Long-term archive, compliance storage
  • Datadog: Real-time monitoring and alerting
  • Splunk: SIEM integration
See Log Integration for setup instructions.

Log Retention

Connector Logs

Connector logs (queries, commands, API calls) are stored in Formal’s Quickwit index and are available for as long as your account is active. For long-term archival or compliance requirements, use Log Integration to forward logs to:
  • AWS S3: Cost-effective long-term storage for compliance (e.g., 7-year SOC 2 retention)
  • Datadog: Real-time monitoring with configurable retention periods
  • Splunk: SIEM integration with custom retention policies

Policy Evaluation Input Retention

Policy evaluation inputs (the input data passed to policies) contain sensitive information and have a configurable retention period of 0 to 30 days. This data powers policy impact reports. Configure retention at Log Configurations independently for each evaluation stage: Retention can be scoped at multiple levels (in precedence order):
  1. Resource — per-resource override
  2. Connector — per-connector default
  3. Space — per-space default
  4. Account — organization-wide default
Setting retention to 0 days disables retention for that stage. Policy impact reports won’t have data to backtest against for disabled stages. Changes to retention settings may take up to a day to take effect.
Policy evaluation inputs may contain sensitive data depending on your policies. Retention is subject to a maximum of 30 days. Changing retention settings may take a day to take effect.

Best Practices

Save frequently used searches for compliance, security, or operational monitoring.
Forward logs to your SIEM or data lake for advanced analytics and long-term retention beyond Formal’s console.
Schedule weekly or monthly log reviews to identify unusual patterns, policy gaps, or security incidents.
Leverage aggregation and visualization to spot trends that aren’t obvious in individual log entries.
Regularly review logs where policies blocked or masked data to ensure policies are working as intended.

Policy Evaluation Input Retention

Formal can optionally retain the input data passed to policies during evaluation. This enables policy backtesting — testing new or modified policies against historical access patterns. Refer to policies evaluation docs for what is available as input at each stage. See Log Retention above for configuration details, scope hierarchy, and retention limits.

Integration with Policies

Policies can enrich logs with contextual information:
The reason and contextual_data fields appear in the log entry, providing audit trail context.

Next Steps

Sessions

View active and completed sessions

Log Integration

Forward logs to your SIEM