← Back to DocsEnterprise

Audit Logs

Every action in Lexic is recorded. Know exactly what happened, when it happened, and who did it. Compliance-ready from day one.

πŸ”’

How do I track what happened?

Lexic's audit logging system captures 50+ event types across every layer of your organization. Each log entry includes full context: who performed the action, what changed, when it happened, and the complete before/after state.

Enterprise-grade: Audit logs are protected by Row-Level Security (RLS), ensuring tenant isolation. You can only view logs for resources you have access to.

Event Categories

Lexic tracks actions across ten major categories. Each event includes full metadata for investigation and compliance.

πŸ”‘

Authentication

user.loginuser.logoutuser.login_faileduser.password_resetuser.mfa_enableduser.mfa_disabled
πŸ‘€

User Management

user.createduser.updateduser.deleteduser.role_changeduser.inviteduser.invitation_accepteduser.removed
🏒

Organization

organization.createdorganization.updatedorganization.deletedorganization.member_addedorganization.member_removedorganization.settings_changed
πŸ“

Lexicon & Workspace

lexicon.createlexicon.updatelexicon.deleteworkspace.createdworkspace.updatedworkspace.deletedworkspace.member_addedworkspace.member_removed
πŸ“

Content

note.creatednote.updatednote.deletednote.viewednote.sharednote.unsharedcanvas.createcanvas.updatecanvas.deletemember.createmember.delete
πŸ€–

AI Operations

ai.embedding_generatedai.entity_extractedai.summary_generatedai.connections_discovered
πŸ›‘

Security

security.access_deniedsecurity.unauthorized_accesssecurity.suspicious_activitysecurity.rate_limit_exceededsecurity.api_key_createdsecurity.api_key_revoked
πŸ’³

Billing & Words

words.purchasedwords.consumedwords.expiredwords.refundedsubscription.startedsubscription.cancelledpayment.successpayment.failed
πŸ“¦

Data & System Operations

data.exporteddata.importeddata.migrateddata.deletedsystem.backup_createdsystem.backup_restoredsystem.maintenance_startsystem.maintenance_end

Severity Levels

Every audit event is assigned a severity level for prioritization and alerting.

LevelExamples
LOWRead operations, searches, viewing notes, listing resources
MEDIUMUpdates, creates, note editing, workspace modifications
HIGHDeletes, permission changes, role modifications, sharing updates
CRITICALSecurity events, data exports, unauthorized access attempts, bulk operations
πŸ“‹

Audit Log Data

Each audit log entry captures comprehensive context for investigation and compliance requirements.

Before/After State (JSONB)

Full snapshots of the resource before and after the action. Perfect for understanding exactly what changed and enabling rollback decisions.

Trace IDs

Request correlation IDs that link related operations. Trace a single user action across multiple service calls and database operations.

Client Context

IP address, user agent, and request origin. Know not just who did something, but from where and how.

Timestamp with Timezone

Precise UTC timestamps with timezone information. Critical for global teams and compliance audits across jurisdictions.

{
Β Β "event": "note.updated",
Β Β "severity": "MEDIUM",
Β Β "actor_id": "user_abc123",
Β Β "resource_id": "note_xyz789",
Β Β "trace_id": "req_1234567890",
Β Β "ip_address": "192.168.1.1",
Β Β "user_agent": "Mozilla/5.0 ...",
Β Β "before_state": { ... },
Β Β "after_state": { ... },
Β Β "timestamp": "2024-01-15T10:30:00Z"
}

πŸ”

Query Filters

Find exactly what you're looking for with powerful filtering options.

By Scope

  • β€’Lexicon
  • β€’Organization
  • β€’Workspace
  • β€’Canvas

By User

  • β€’Filter by actor (who did it)
  • β€’Filter by affected user
  • β€’Filter by role

By Action Type

  • β€’Event category (auth, content, etc.)
  • β€’Specific event type
  • β€’Severity level

By Date Range

  • β€’Start and end timestamps
  • β€’Relative ranges (last 7 days, etc.)
  • β€’Timezone-aware filtering
βœ…

Compliance Features

Built for enterprise compliance requirements from day one.

RLS-Enforced Tenant Isolation

Row-Level Security ensures complete data isolation. Users can only access audit logs for resources they have permission to view. Even database administrators cannot bypass these restrictions.

Multi-Record Operation Support

Bulk operations (batch deletes, imports, etc.) generate individual audit records for each affected resource, linked by a common trace ID. Full accountability even at scale.

Error Code Tracking

Failed operations are logged with detailed error codes and context. Track not just what succeeded, but what was attempted and why it failed.

🎯

Enterprise-Ready Audit Infrastructure

Lexic's audit logging is designed to meet the requirements of SOC 2, GDPR, and other compliance frameworks. Complete visibility into every action, with the controls needed for regulated industries.

  • βœ“Immutable audit trail
  • βœ“Configurable retention policies
  • βœ“Export capability for external SIEM integration
  • βœ“Real-time alerting on critical events