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-explorerInstall Go dependencies:
go mod downloadInstall 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.shDevelopment build:
wails build -debugProduction 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.shOption 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_IDOption 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 operationsSearch 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 devRun frontend only:
cd frontend
npm run devBuild for production:
wails buildBackend (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 listBuild 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 buildLog 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: [email protected]
- 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.