Skip to main content
The Logs page provides comprehensive logging capabilities for your DFX Dashboard activities, featuring both command history tracking and canister log viewing. This powerful tool enables efficient debugging, workflow optimization, and development process documentation.

Overview

The Logs page is organized into two main tabs designed for comprehensive log management:

Command History

Complete history of dfx commands executed through the dashboard

Canister Logs

Real-time canister logs with filtering and search capabilities
The Logs page tracks commands executed through the DFX Dashboard and provides access to canister logs across all your projects for comprehensive debugging and monitoring.

Log Management Features

  • Command History
  • Canister Logs

Command History Tab

Command HistoryThe Command History tab provides a comprehensive view of all dfx commands executed through the DFX Dashboard, allowing you to review, analyze, and re-execute past commands.

Table Structure

The command history table includes the following columns:
  • Date: The date when the command was executed (sortable)
  • Time: The specific time of command execution with precision
  • Commands are sorted by date/time in descending order (newest first)
  • Subcommand: The dfx subcommand type (e.g., “canister”)
  • Command: The actual dfx command that was executed
  • Color-coded subcommands for easy identification
  • Info Button: View detailed command output and execution details
  • Copy Button: Copy command text to clipboard
  • Re-execute Button: Run the command again (if applicable)

Command Filtering

Subcommand Filter

Filter commands by type (All, Canister, etc.)

Date Sorting

Commands automatically sorted by execution time

Command Actions

1

View Output

Click the Info button to see detailed command output in a modal
2

Copy Command

Click the Copy button to copy the command text to clipboard
3

Re-execute

Click the Play button to run the command again (when available)

Command Output Modal

Command Output ModalThe command output modal provides:

Command Details

  • Full command text with parameters
  • Execution path context
  • Command type classification

Execution Results

  • Complete command output with syntax highlighting
  • Error messages and warnings
  • Scrollable output area for long results
Use the command history to track your development workflow and quickly re-execute successful commands. The output modal helps with debugging by showing complete command results.

Log Data Structure

Understanding the log data structure helps with effective debugging and analysis:

Command History Format

Each command history entry contains:
  • Timestamp: Date and time of execution
  • Command: Full dfx command with parameters
  • Path: Working directory context
  • Result: Complete command output
  • Subcommand: Command category for filtering
  • Commands are parsed from log files automatically
  • Timestamps are extracted and formatted for display
  • Results are cleaned and formatted for readability
  • Paths are extracted for context information

Canister Log Format

Canister logs follow the format:
[count. YYYY-MM-DDTHH:mm:ss.sssZ]: message
  • Count: Sequential log entry number
  • ISO Timestamp: Precise timestamp in ISO format
  • Message: The actual log content
  • Automatic parsing of timestamp components
  • Message content preserved exactly as logged
  • Empty lines and malformed entries handled gracefully

Best Practices

Optimize your command history workflow:
  • Regular Review: Periodically review command history for workflow optimization
  • Error Analysis: Use command outputs to debug failed operations
  • Command Reuse: Copy and modify successful commands for similar tasks
  • Timeline Tracking: Use timestamps to understand development progression
Effective canister log monitoring:
  • Regular Checks: Monitor canister logs regularly for issues
  • Search Utilization: Use search functionality to find specific events
  • Error Identification: Look for error patterns in log messages
  • Performance Monitoring: Track performance-related log entries
Leverage logs for debugging:
  • Command Correlation: Correlate command history with canister logs
  • Timeline Analysis: Use timestamps to understand event sequences
  • Error Tracing: Trace errors from commands to canister responses
  • Pattern Recognition: Identify recurring issues through log analysis

Troubleshooting

Common command history problems:Problem: Commands not appearing in history
  • Ensure commands are executed through the DFX Dashboard
  • Check if the command log file is accessible
  • Verify the command completed execution
  • Restart the dashboard if logs aren’t updating
Problem: Command output is incomplete
  • Check if the command is still running
  • Verify network connectivity for network commands
  • Look for error messages in the output modal
  • Try re-executing the command for complete output
Common canister log problems:Problem: No logs appearing for canister
  • Verify the canister is deployed and running
  • Check network connectivity to the canister
  • Ensure the canister has generated log entries
  • Try refreshing by selecting the canister again
Problem: Canister not appearing in dropdown
  • Verify the project is loaded in the dashboard
  • Check if the canister is properly deployed
  • Ensure dfx.json configuration is correct
  • Try refreshing the projects list
Common search and filter problems:Problem: Search not finding expected results
  • Check search term spelling and case
  • Verify the logs contain the expected content
  • Try broader search terms
  • Clear search and try again
Problem: Filters not working correctly
  • Ensure the filter criteria match available data
  • Try resetting filters to default
  • Check if data is loading properly
  • Refresh the page if filters seem stuck

Performance Considerations

Log Volume Management

Large log volumes may impact performance - consider regular cleanup

Network Efficiency

Canister logs are fetched over network - monitor for connectivity issues

Search Optimization

Use specific search terms for faster results in large log sets

Memory Usage

Large command histories may use significant memory - restart if needed

Additional Resources

Ready to explore application settings and configuration? Continue to the Settings page to learn about DFX version management, environment variables, and application preferences.
I