|
| 1 | +# 🌸 AppThrust Kutelog |
| 2 | + |
| 3 | +Kutelog is a development tool that leverages your browser's Console to make structured logs from Kubebuilder controllers easy to read in real-time. By utilizing the Console's powerful features, it helps developers see and analyze what their controllers are doing while they work on them. |
| 4 | + |
| 5 | +Works with Chrome, Firefox, Safari, and Edge. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## 📦 Installation |
| 10 | + |
| 11 | +### Using Homebrew |
| 12 | + |
| 13 | +```bash |
| 14 | +brew tap appthrust/tap |
| 15 | +brew install kutelog |
| 16 | +``` |
| 17 | + |
| 18 | +### Manual Installation |
| 19 | + |
| 20 | +Download the latest binary from [GitHub Releases](https://github.com/appthrust/kutelog/releases). |
| 21 | + |
| 22 | +## 🚀 Usage |
| 23 | + |
| 24 | +### With Kubebuilder Controllers |
| 25 | +```bash |
| 26 | +make run 2>&1 | kutelog |
| 27 | +``` |
| 28 | + |
| 29 | +### With Kubernetes Logs |
| 30 | +```bash |
| 31 | +kubectl logs -f deployment/myapp | kutelog |
| 32 | +``` |
| 33 | + |
| 34 | +## 🤔 Why Browser Console? |
| 35 | + |
| 36 | +Traditional CLI tools are great, but Browser Console offers unique advantages for structured logs: |
| 37 | + |
| 38 | +- **JSON Handling** |
| 39 | + - CLI: Long, hard-to-read single-line JSON strings |
| 40 | + - Console: Interactive object explorer with expand/collapse functionality |
| 41 | + - Easily navigate through nested data structures |
| 42 | + |
| 43 | +- **Filtering Capabilities** |
| 44 | + - CLI: Limited to grep-like text filtering |
| 45 | + - Console: Rich filtering options using built-in Console filters |
| 46 | + - Quickly switch between log levels (error, warn, info) |
| 47 | + |
| 48 | +- **Search Experience** |
| 49 | + - CLI: Basic text search |
| 50 | + - Console: Advanced search with pattern matching |
| 51 | + - Search within specific log fields |
| 52 | + |
| 53 | +## 💡 Console Tips |
| 54 | + |
| 55 | +- **Log Level Filtering** |
| 56 | + - Use `error` to show only error logs |
| 57 | + - Use `warn` to show warnings and errors |
| 58 | + - Use `info` to show info, warnings, and errors |
| 59 | + - Click the level icons in the Console toolbar for quick filtering |
| 60 | + |
| 61 | +- **Search Techniques** |
| 62 | + - Use `/pattern/` for regex search |
| 63 | + - Use `-word` to exclude entries containing "word" |
| 64 | + |
| 65 | +- **Object Navigation** |
| 66 | + - Click the ▶ arrow to expand objects |
| 67 | + - Right-click properties for copy options |
| 68 | + |
| 69 | +- **Console Management** |
| 70 | + - Click clear button (⊘ in Chrome/Edge, 🗑️ in Firefox/Safari) or press Cmd+K (macOS) / Ctrl+L (Windows/Linux) to clear console |
| 71 | + - Type `////////////////////////////////////` to add a visual separator |
| 72 | + |
| 73 | +## ✨ Features |
| 74 | + |
| 75 | +- 🔍 **Browser Console Benefits** |
| 76 | + - Interactive exploration of structured JSON data |
| 77 | + - Expand/collapse nested objects with ease |
| 78 | + - No more dealing with single-line JSON strings |
| 79 | + |
| 80 | +- 🎯 **Powerful Filtering** |
| 81 | + - Filter by log levels using Console filters (error, warn, info) |
| 82 | + - Advanced text search capabilities |
| 83 | + - Focus on what matters to you |
| 84 | + |
| 85 | +- 🔄 **Real-time Updates** |
| 86 | + - WebSocket-based live streaming |
| 87 | + - Automatic reconnection if connection is lost |
| 88 | + |
| 89 | +## 🛠️ How to Use |
| 90 | + |
| 91 | +1. Start Kutelog with your log stream |
| 92 | +2. Open `http://localhost:9106` in your browser |
| 93 | +3. Open DevTools Console (F12 or Cmd+Option+J) |
| 94 | +4. Use Console filters to focus on specific log levels |
0 commit comments