Core concepts for Fullstory's Logging API. Platform-agnostic guide covering log levels, message formatting, privacy considerations, and best practices...
Implementation Files: This document covers core concepts. For code examples, see:
- SKILL-WEB.md β JavaScript/TypeScript (Browser)
- SKILL-MOBILE.md β iOS, Android, Flutter, React Native
Fullstory's Logging API allows developers to send log messages directly to Fullstory sessions. These logs appear in the session replay, providing valuable context for debugging user issues, tracking application state, and understanding user workflowsβwithout cluttering the device's console or logging systems.
Key use cases:
All platforms support the same log levels, though the syntax differs:
| Level | Use For | Severity |
|---|---|---|
log |
General information | Lowest |
info |
Informational messages | Low |
warn |
Warning conditions | Medium |
error |
Error conditions | High |
debug |
Debug information | Varies |
| Behavior | Description |
|---|---|
| Session-only | Logs appear in Fullstory session replay, not device console |
| Session context | Logs viewable in session replay timeline |
| Timestamped | Automatically timestamped by Fullstory |
| Searchable | Can search sessions by log content |
| String messages | All platforms require string messages |
| Use FS Logging | Use Device Console |
|---|---|
| Production errors you want in replay | Development-only debugging |
| State changes for support context | Verbose tracing during development |
| User action audit trails | Performance timing logs |
| Integration errors | Internal debugging |
| Customer-facing error context | CI/CD diagnostics |
Never log sensitive data:
Safe to log:
debug β Development troubleshooting, verbose details
log β General operational information
info β Significant but normal events
warn β Potential issues, degraded functionality
error β Failures requiring attention
[Auth], [Payment], [API]Good to log:
Avoid logging:
Build wrapper functions that:
| Constraint | Limit |
|---|---|
| Message type | String only (no objects) |
| Rate limiting | Standard API rate limits apply |
| Excessive logging | May be throttled |
| Message length | Keep concise; very long messages may be truncated |
error levelinfo level for normal operationswarn for unusual but valid actionserror for failed operationsWhen helping developers implement Fullstory logging:
Always emphasize:
Common mistakes to watch for:
Platform routing: