A powerful desktop application for exploring and analyzing Google Cloud Platform (GCP) logs with a modern, intuitive interface.
- 🔍 Real-time Log Streaming - Live log updates with auto-refresh every 5 seconds
- 📱 Cross-platform Desktop App - Runs natively on Windows, macOS, and Linux
- 🎯 Advanced Filtering - Filter by time range, resource type, severity, and custom queries
- 🔐 Dual Authentication - Support for both gcloud CLI and direct access token authentication
- 📊 Smart Resource Discovery - Automatically discovers available GCP resources from log data
- 🎨 Professional UI - Modern, responsive interface built with React and Tailwind CSS
- 📋 JSON Payload Viewer - Sophisticated JSON viewer with syntax highlighting and collapsible sections
- 🔍 Full-text Search - Search across all log fields including JSON payload content
- 📄 Pagination - Efficient pagination with configurable page sizes (10, 30, 50, 100 logs per page)
- 📋 One-click Copy - Copy individual fields or entire JSON objects to clipboard
- ⏸️ Cancellable Operations - Cancel long-running log fetch operations
- 🏷️ Resource-specific Filtering - Drill down to specific resource instances
- Compute Engine - GCE instances and VM logs
- Kubernetes - Container and pod logs from GKE clusters
- Cloud Functions - Serverless function execution logs
- App Engine - GAE application logs with service and version filtering
- Cloud Run - Container service logs
- Cloud SQL - Database operation logs
- Pub/Sub - Topic and subscription logs
This application uses Wails v2 to combine:
- Go Backend - Handles GCP API integration, authentication, and log processing
- React Frontend - Modern TypeScript-based UI with Next.js and Tailwind CSS
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ React UI │◄──►│ Wails Bridge │◄──►│ Go Backend │
│ │ │ │ │ │
│ • Components │ │ • IPC Calls │ │ • GCP APIs │
│ • State Mgmt │ │ • Type Safety │ │ • Auth Handler │
│ • UI/UX │ │ • Event System │ │ • Log Parser │
└─────────────────┘ └──────────────────┘ └─────────────────┘
- Go 1.23.0+ - For building the backend
- Node.js 18+ - For the frontend build process
- Wails CLI - For application compilation
- GCP Project with Cloud Logging API enabled
- Authentication via one of:
- Google Cloud CLI (
gcloud
) installed and authenticated - Valid GCP access token
- Google Cloud CLI (
git clone https://github.com/Yxnt/gcp-log-explorer.git
cd gcp-log-explorer
Install Go dependencies:
go mod download
Install Node.js dependencies:
cd frontend
npm install
cd ..
# Windows
./scripts/install-wails-cli.bat
# macOS/Linux
chmod +x ./scripts/install-wails-cli.sh
./scripts/install-wails-cli.sh
Development build:
wails build -debug
Production build:
# Windows
./scripts/build-windows.bat
# macOS (Intel)
./scripts/build-macos-intel.sh
# macOS (Apple Silicon)
./scripts/build-macos-arm.sh
# Generic build
./scripts/build.sh
Option A: Google Cloud CLI (Recommended)
# Install gcloud CLI
curl https://sdk.cloud.google.com | bash
# Authenticate
gcloud auth login
gcloud config set project YOUR_PROJECT_ID
Option B: Access Token
# Get access token
gcloud auth print-access-token
# Use token in the application's token authentication tab
- Launch the application
- Authenticate using either gcloud CLI or access token
- Select Project from your available GCP projects
- Choose Resource Type (e.g., GCE instances, Kubernetes containers)
- Select Time Range (preset ranges or custom date/time)
- Fetch Logs to start exploring
Authentication Panel:
- Choose between gcloud CLI or manual token input
- Automatic authentication status checking
- User information display
Control Panel:
- Project Selector - Search and select from available projects
- Resource Type - Choose resource type to monitor
- Specific Resource - Optional filtering to specific instances
- Time Range - Flexible time range selection
- Filters - JSON-only logs and custom filters
Log Display:
- Real-time Updates - Auto-refresh indicator and controls
- Search - Full-text search across all log fields
- JSON Viewer - Expandable JSON with copy functionality
- Pagination - Navigate through large log sets
Real-time Monitoring:
# The application automatically:
1. Fetches initial log batch
2. Enables auto-refresh if more logs are available
3. Continuously polls for new logs every 5 seconds
4. Provides cancellation controls for long operations
Search Capabilities:
- Search across log messages, JSON payloads, and metadata
- Case-insensitive matching
- Real-time results filtering
- Search result highlighting
JSON Analysis:
- Automatic JSON detection and parsing
- Collapsible nested structures
- Type-aware syntax highlighting
- One-click copying of values and objects
gcp-log-explorer-wails-nextjs/
├── app.go # Main Go application logic
├── main.go # Wails application entry point
├── go.mod # Go dependencies
├── wails.json # Wails configuration
├── frontend/ # React frontend
│ ├── components/ # React components
│ ├── pages/ # Next.js pages
│ ├── public/ # Static assets
│ ├── styles/ # CSS and styling
│ └── wailsjs/ # Generated Wails bindings
├── scripts/ # Build scripts
└── build/ # Compiled binaries
Start development server:
wails dev
Run frontend only:
cd frontend
npm run dev
Build for production:
wails build
Backend (app.go
):
GetProjects()
- Retrieve available GCP projectsGetResources()
- Discover available resource typesGetLogs()
- Fetch and parse log entriesCheckGcloudAuth()
- Verify authentication status- Advanced JSON payload parsing with escape handling
Frontend Components:
LoginPage
- Authentication interfaceProjectSelector
- Project selection with searchResourceTypeSelector
- Resource type managementTimeRangeSelector
- Flexible time range pickerJsonViewer
- Advanced JSON display component
Authentication Problems:
# Check gcloud authentication
gcloud auth list
# Re-authenticate if needed
gcloud auth login
# Verify project access
gcloud projects list
Build Issues:
# Clean and rebuild
rm -rf build/
rm -rf frontend/node_modules/
rm -rf frontend/out/
# Reinstall dependencies
cd frontend && npm install && cd ..
go mod download
# Rebuild
wails build
Log Access Issues:
- Ensure Cloud Logging API is enabled for your project
- Verify IAM permissions for log viewing
- Check if the selected resource type exists in your project
- Use specific resource filtering to reduce log volume
- Adjust time ranges for better performance
- Use JSON-only filter when analyzing structured logs
- Cancel operations if they're taking too long
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow Go best practices and conventions
- Use TypeScript for all React components
- Maintain consistent code formatting
- Add tests for new functionality
- Update documentation for new features
This project is licensed under the MIT License - see the LICENSE file for details.
Yxnt (Yxnt)
- Email: jyxnt1@gmail.com
- GitHub: @Yxnt
- Claude - For invaluable assistance in code analysis, documentation, and development guidance
- Kiro - For inspiration and collaborative development support
- Wails Team - For the excellent Go + Web framework
- Google Cloud - For comprehensive APIs and documentation
- React & Next.js - For the modern frontend framework
- Tailwind CSS - For beautiful, responsive styling
- Radix UI - For accessible component primitives
Note: This application provides a desktop alternative to the Google Cloud Console for log analysis, offering enhanced search capabilities, real-time updates, and a focused log exploration experience.