Skip to main content
Logs are text-based records that capture events occurring during the execution of your AI-powered application. They are essential tools for debugging, monitoring, and improving AI systems.

Key Features

  • System Observability: Track application events and errors to ensure smooth operation and quick resolution of issues.
  • Troubleshooting: Analyze logs to identify the root cause of issues by examining error messages, system state, and the sequence of events leading to the problem.
Depending on your application, you may find it useful to log:
  • The application that generated the logs
  • Messages reported by the application
  • Warnings or errors encountered during runtime
  • Outputs or inputs to a specific component

Capture Logs

If telemetry is configured, logs are automatically generated by the Inworld runtime during graph execution and sent to Portal.
Support for capturing your own custom logs in Portal is coming soon.
You can adjust the level of log detail by setting the VERBOSITY and logger.level options.
ControlValuesDefaultDescription
VERBOSITY0, 1, 20Controls what logs are generated:
0=none
1=some
2=all
logger.levelINFO
WARN
DEBUG
TRACE
INFOControls what gets sent to Portal
We recommend the following set up depending on your use case:
  • Default: VERBOSITY=0 + LogLevel.INFO - standard logs only
  • Debugging: VERBOSITY=1 + LogLevel.DEBUG - adds debug details
  • Max detail: VERBOSITY=2 + LogLevel.TRACE - everything
To get started, follow the SDK specific instructions below:
  • Node.js
  • Unreal
  • C++
Logging is enabled by default. Just set your API key:
export INWORLD_API_KEY=your-api-key
To set the VERBOSITY:
bash
export VERBOSITY=1  # For debug logs
To set the logger.level:
graph.ts
import { telemetry, LogLevel } from '@inworld/runtime';

telemetry.init({
  apiKey: process.env.INWORLD_API_KEY,
  logger: { level: LogLevel.DEBUG }  // For Portal filtering
});

View Logs

  • Click on a log to open a side view
  • Toggle between the Overview and JSON view
  • Use the Filter panel to sort by severity, Service name, Variant, and Graph ID
  • Use the Search bar to filter logs by keywords or IDs.

Log Metadata Definitions

Field NameDescription
TimestampTime of the log entry.
BodyText of the log message.
Execution IDUnique identifier for the associated trace (if it exists). You can find the trace in Traces.
Span IDIdentifier for the individual span (if it exists).
SeverityLog level: DEBUG, INFO, WARNING, ERROR.

When Should I Use Logs vs Traces?

As opposed to traces, which shows the flow of a single execution, logs can be used to capture details about specific events, including detailed metadata unique to that event. Below is an overview of some key differences:
AspectLogsTraces
PurposeCaptures discrete events (errors, warnings, info)Capture end-to-end execution flows
ScopeCapture specific moments in timeCapture relationships between nodes
GranularityOften capture detailed, low-level system information, including errors or performance metricsShow the high-level flow of a request across nodes, including inputs/output
Use CaseDebugging, monitoring, auditing, performance tracking, and error reportingEnd-to-end execution tracking, identifying bottlenecks, tracing dependencies
Use logs when you need to:
  • Debug failure cases or unexpected behavior
  • Track specific metrics or state changes
  • Capture intermediate values within nodes (beyond inputs/outputs)

Next Steps