@crimsonsunset/jsg-logger 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/CONTRIBUTING.md +58 -0
- package/LICENSE +15 -0
- package/README.md +428 -0
- package/config/component-schemes.js +26 -0
- package/config/config-manager.js +378 -0
- package/config/default-config.json +92 -0
- package/docs/next-session.md +136 -0
- package/docs/roadmap.md +404 -0
- package/examples/advanced-config.json +151 -0
- package/formatters/browser-formatter.js +227 -0
- package/formatters/cli-formatter.js +43 -0
- package/formatters/server-formatter.js +42 -0
- package/index.js +413 -0
- package/package.json +74 -0
- package/stores/log-store.js +148 -0
- package/utils/environment-detector.js +38 -0
package/docs/roadmap.md
ADDED
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
# JSG Logger - Roadmap
|
|
2
|
+
|
|
3
|
+
## ๐ How to Update This Doc
|
|
4
|
+
|
|
5
|
+
**When starting a new Cursor session:**
|
|
6
|
+
1. **Update "Current Status"** - What's completed since last session
|
|
7
|
+
2. **Update "Recent Progress"** - Add session notes and blockers
|
|
8
|
+
3. **Check off items** in "Implementation Phases" as you complete them
|
|
9
|
+
4. **Add to "Technical Decisions"** if you make architecture choices
|
|
10
|
+
|
|
11
|
+
**Update frequency:**
|
|
12
|
+
- **Current Status** - Every session
|
|
13
|
+
- **Recent Progress** - Every session (can have multiple sessions per day)
|
|
14
|
+
- **Implementation Phases** - As features complete
|
|
15
|
+
- **Vision & Architecture** - Rarely (major changes only)
|
|
16
|
+
- **Technical Decisions** - When making key choices
|
|
17
|
+
|
|
18
|
+
**Note:** Multiple sessions per day are common - just add new progress entries additively rather than replacing previous session work.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ๐ฏ Current Status
|
|
23
|
+
**Last Updated:** August 6, 2025
|
|
24
|
+
**Current Phase:** Published & Stable - Documentation Enhancement
|
|
25
|
+
**Status:** โ
**FEATURE COMPLETE** - Logger successfully extracted, published, and integrated
|
|
26
|
+
**Next Session Goal:** DevTools Panel implementation (optional enhancement)
|
|
27
|
+
|
|
28
|
+
### Progress Overview
|
|
29
|
+
- โ
**COMPLETED:** Multi-environment logger with smart detection
|
|
30
|
+
- โ
**COMPLETED:** Direct browser logger bypassing Pino for 100% console control
|
|
31
|
+
- โ
**COMPLETED:** File-level overrides with glob pattern support
|
|
32
|
+
- โ
**COMPLETED:** Runtime controls API for dynamic configuration
|
|
33
|
+
- โ
**COMPLETED:** Beautiful formatting with emojis and colors
|
|
34
|
+
- โ
**COMPLETED:** Component organization and log store
|
|
35
|
+
- โ
**COMPLETED:** NPM package publication as `@crimsonsunset/jsg-logger`
|
|
36
|
+
- โ
**COMPLETED:** DeskThing-Apps migration to published package
|
|
37
|
+
- โ
**COMPLETED:** Automated publishing scripts
|
|
38
|
+
- โ
**COMPLETED:** Documentation structure (LICENSE, CHANGELOG, CONTRIBUTING)
|
|
39
|
+
|
|
40
|
+
### Key Achievements
|
|
41
|
+
- **๐ BREAKTHROUGH:** Custom browser logger achieving perfect visual formatting
|
|
42
|
+
- **๐ฆ NPM Publication:** Reusable package available for any project
|
|
43
|
+
- **๐ง Complete API:** Runtime controls for all configuration aspects
|
|
44
|
+
- **โก Performance:** Lightweight with smart environment detection
|
|
45
|
+
- **๐ Documentation:** Comprehensive README with examples
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## ๐ฎ Vision & Architecture
|
|
50
|
+
|
|
51
|
+
### Core Mission
|
|
52
|
+
**Create a universally adaptable logger that provides beautiful output across any JavaScript environment while maintaining surgical debugging precision.**
|
|
53
|
+
|
|
54
|
+
### Key Principles
|
|
55
|
+
1. **Environment Agnostic** - Works perfectly in browser, CLI, and server
|
|
56
|
+
2. **Zero Configuration** - Sensible defaults with optional customization
|
|
57
|
+
3. **Surgical Precision** - File-level and component-level control
|
|
58
|
+
4. **Beautiful Output** - Professional formatting that developers enjoy using
|
|
59
|
+
5. **Runtime Flexibility** - All settings adjustable without restarts
|
|
60
|
+
|
|
61
|
+
### Target Environments
|
|
62
|
+
- โ
**Browser Console** - Rich formatting with colors and emojis
|
|
63
|
+
- โ
**CLI Applications** - Terminal-optimized output with pino-colada
|
|
64
|
+
- โ
**Server/Production** - Structured JSON for log aggregation
|
|
65
|
+
- โ
**Chrome Extensions** - Seamless integration with extension architecture
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## ๐ Implementation Phases
|
|
70
|
+
|
|
71
|
+
### **Phase 1: Core Foundation** โ
COMPLETE
|
|
72
|
+
- [x] Environment detection system
|
|
73
|
+
- [x] Multi-environment formatters (browser, CLI, server)
|
|
74
|
+
- [x] Component-based logger organization
|
|
75
|
+
- [x] Basic configuration management
|
|
76
|
+
|
|
77
|
+
### **Phase 2: Advanced Features** โ
COMPLETE
|
|
78
|
+
- [x] File-level override system with glob patterns
|
|
79
|
+
- [x] Runtime controls API
|
|
80
|
+
- [x] Direct browser logger (Pino bypass)
|
|
81
|
+
- [x] Beautiful console formatting
|
|
82
|
+
- [x] Log store for debugging interfaces
|
|
83
|
+
|
|
84
|
+
### **Phase 3: Polish & Integration** โ
COMPLETE
|
|
85
|
+
- [x] Comprehensive documentation
|
|
86
|
+
- [x] Example configurations
|
|
87
|
+
- [x] Chrome extension integration
|
|
88
|
+
- [x] Production-ready error handling
|
|
89
|
+
|
|
90
|
+
### **Phase 4: Publication & Distribution** โ
COMPLETE
|
|
91
|
+
- [x] NPM package preparation
|
|
92
|
+
- [x] Automated publishing scripts
|
|
93
|
+
- [x] ISC license with "AS IS" protection
|
|
94
|
+
- [x] Professional README with examples
|
|
95
|
+
- [x] DeskThing-Apps migration to published package
|
|
96
|
+
|
|
97
|
+
### **Phase 5: Documentation & Ecosystem** โ
COMPLETE
|
|
98
|
+
- [x] LICENSE file (ISC)
|
|
99
|
+
- [x] CHANGELOG.md with version history
|
|
100
|
+
- [x] CONTRIBUTING.md guidelines
|
|
101
|
+
- [x] docs/ folder structure
|
|
102
|
+
- [x] Roadmap and session tracking
|
|
103
|
+
|
|
104
|
+
### **Phase 6: DevTools Panel Implementation** ๐ฏ FUTURE
|
|
105
|
+
- [ ] **DevTools Panel Architecture** - Runtime-injected browser widget
|
|
106
|
+
- [ ] **UI Components** - Preact-based filtering controls
|
|
107
|
+
- [ ] **Panel Integration** - Floating button + collapsible sidebar
|
|
108
|
+
- [ ] **Filter Controls** - Component toggles using existing logger.controls API
|
|
109
|
+
- [ ] **State Persistence** - IndexedDB for panel preferences
|
|
110
|
+
- [ ] **Real-time Filtering** - Forward console filtering without log display
|
|
111
|
+
|
|
112
|
+
### **Phase 7: Optional Ecosystem Enhancements** ๐ฏ FUTURE
|
|
113
|
+
- [ ] **Performance Monitoring** - Log performance metrics
|
|
114
|
+
- [ ] **Export Utilities** - Save logs to file formats
|
|
115
|
+
- [ ] **Integration Guides** - Framework-specific examples
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## ๐จ **Phase 6: DevTools Panel - Detailed Implementation Plan**
|
|
120
|
+
|
|
121
|
+
*This section outlines the complete technical approach for the optional DevTools panel enhancement.*
|
|
122
|
+
|
|
123
|
+
### **๐๏ธ Architecture Overview**
|
|
124
|
+
|
|
125
|
+
**Core Pattern**: Runtime-Injected Widget with Manual Activation
|
|
126
|
+
- **No bundle impact** when panel disabled
|
|
127
|
+
- **Dynamic loading** via `logger.controls.enableDevPanel()`
|
|
128
|
+
- **Pure UI controls** - no log display, only console filtering
|
|
129
|
+
- **Existing API leverage** - Uses `logger.controls` for all filtering
|
|
130
|
+
|
|
131
|
+
### **๐ฏ User Experience Design**
|
|
132
|
+
|
|
133
|
+
#### **Activation Flow**
|
|
134
|
+
1. **Manual Trigger**: `logger.controls.enableDevPanel()` or browser extension
|
|
135
|
+
2. **Floating Button**: Mid-screen left side, minimal and unobtrusive
|
|
136
|
+
3. **Panel Reveal**: Collapsible sidebar slides in from left on button click
|
|
137
|
+
4. **Persistent State**: Panel open/closed state saved to IndexedDB
|
|
138
|
+
|
|
139
|
+
#### **Panel Interface**
|
|
140
|
+
```
|
|
141
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
142
|
+
โ ๐๏ธ Logger Controls โ
|
|
143
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
144
|
+
โ โ๏ธ soundcloud [ON] โ
|
|
145
|
+
โ โ๏ธ websocket [ON] โ
|
|
146
|
+
โ โ popup [OFF] โ
|
|
147
|
+
โ โ๏ธ priority-mgr [ON] โ
|
|
148
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
149
|
+
โ ๐ Global Controls โ
|
|
150
|
+
โ [Debug All] [Trace All] โ
|
|
151
|
+
โ [Reset] [Export Config] โ
|
|
152
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### **๐ง Technical Implementation**
|
|
156
|
+
|
|
157
|
+
#### **Widget Injection Strategy**
|
|
158
|
+
```javascript
|
|
159
|
+
// Runtime injection approach
|
|
160
|
+
logger.controls.enableDevPanel = () => {
|
|
161
|
+
if (typeof window === 'undefined') return; // Browser only
|
|
162
|
+
|
|
163
|
+
// Dynamic import to avoid bundle impact
|
|
164
|
+
import('./devtools-panel.js').then(module => {
|
|
165
|
+
module.initializePanel();
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
#### **Filter Engine Strategy**
|
|
171
|
+
**NO custom filter engine needed** - leverage existing architecture:
|
|
172
|
+
|
|
173
|
+
```javascript
|
|
174
|
+
// Panel toggles soundcloud off
|
|
175
|
+
logger.controls.setLevel('soundcloud', 'silent');
|
|
176
|
+
// โ Console immediately stops showing soundcloud logs
|
|
177
|
+
|
|
178
|
+
// Panel toggles soundcloud back on
|
|
179
|
+
logger.controls.setLevel('soundcloud', 'info');
|
|
180
|
+
// โ Console resumes showing soundcloud logs
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
#### **Real-time Forward Filtering**
|
|
184
|
+
- **Immediate effect**: Changes apply to new logs going forward
|
|
185
|
+
- **No retroactive filtering**: Existing console logs remain unchanged
|
|
186
|
+
- **Uses existing `shouldDisplay()`**: Leverages proven filtering logic
|
|
187
|
+
- **Zero performance impact**: No log interception or custom processing
|
|
188
|
+
|
|
189
|
+
### **๐ ๏ธ Technology Stack**
|
|
190
|
+
|
|
191
|
+
#### **Framework Choice: Preact**
|
|
192
|
+
- **Bundle size**: ~3KB (vs 45KB for React)
|
|
193
|
+
- **Compatibility**: React-like API with smaller footprint
|
|
194
|
+
- **Performance**: Fast rendering for responsive UI
|
|
195
|
+
- **Browser support**: Modern browsers only (acceptable for dev tool)
|
|
196
|
+
|
|
197
|
+
#### **State Management: IndexedDB**
|
|
198
|
+
```javascript
|
|
199
|
+
// Panel preferences persistence
|
|
200
|
+
const panelState = {
|
|
201
|
+
isOpen: boolean,
|
|
202
|
+
componentFilters: {
|
|
203
|
+
'soundcloud': 'info',
|
|
204
|
+
'websocket': 'debug',
|
|
205
|
+
'popup': 'silent'
|
|
206
|
+
},
|
|
207
|
+
globalLevel: 'info',
|
|
208
|
+
position: { x: number, y: number }
|
|
209
|
+
};
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### **Styling Approach**
|
|
213
|
+
- **CSS-in-JS**: Styled components for scoped styling
|
|
214
|
+
- **Dark theme**: Professional dev tool appearance
|
|
215
|
+
- **No external dependencies**: Self-contained styling
|
|
216
|
+
- **Z-index management**: Ensures panel appears above page content
|
|
217
|
+
|
|
218
|
+
### **๐ฑ Component Architecture**
|
|
219
|
+
|
|
220
|
+
#### **Component Hierarchy**
|
|
221
|
+
```
|
|
222
|
+
DevToolsPanel
|
|
223
|
+
โโโ FloatingButton
|
|
224
|
+
โโโ PanelContainer
|
|
225
|
+
โ โโโ ComponentFilters
|
|
226
|
+
โ โ โโโ FilterToggle (per component)
|
|
227
|
+
โ โโโ GlobalControls
|
|
228
|
+
โ โ โโโ LevelButtons
|
|
229
|
+
โ โ โโโ ActionButtons
|
|
230
|
+
โ โโโ ConfigExport
|
|
231
|
+
โโโ PanelProvider (IndexedDB context)
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
#### **State Flow**
|
|
235
|
+
```
|
|
236
|
+
User clicks toggle
|
|
237
|
+
โ
|
|
238
|
+
Component state updates
|
|
239
|
+
โ
|
|
240
|
+
IndexedDB persistence
|
|
241
|
+
โ
|
|
242
|
+
logger.controls API call
|
|
243
|
+
โ
|
|
244
|
+
Console filtering updates
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### **๐ Implementation Phases**
|
|
248
|
+
|
|
249
|
+
#### **Phase 6.1: Core Infrastructure**
|
|
250
|
+
- [ ] **Runtime injection system** - Dynamic module loading
|
|
251
|
+
- [ ] **Floating button component** - Minimal activation trigger
|
|
252
|
+
- [ ] **Basic panel container** - Collapsible sidebar structure
|
|
253
|
+
- [ ] **IndexedDB integration** - State persistence foundation
|
|
254
|
+
|
|
255
|
+
#### **Phase 6.2: Filter Controls**
|
|
256
|
+
- [ ] **Component detection** - Auto-discover available loggers
|
|
257
|
+
- [ ] **Toggle components** - Individual component on/off switches
|
|
258
|
+
- [ ] **Real-time updates** - Immediate console filtering
|
|
259
|
+
- [ ] **Visual feedback** - Show current filter states
|
|
260
|
+
|
|
261
|
+
#### **Phase 6.3: Advanced Features**
|
|
262
|
+
- [ ] **Global controls** - Debug all, trace all, reset options
|
|
263
|
+
- [ ] **Config export/import** - Save/load filter configurations
|
|
264
|
+
- [ ] **Panel positioning** - Draggable and resizable panel
|
|
265
|
+
- [ ] **Keyboard shortcuts** - Quick panel toggle (Ctrl+`)
|
|
266
|
+
|
|
267
|
+
#### **Phase 6.4: Polish & Testing**
|
|
268
|
+
- [ ] **Visual polish** - Professional dev tool styling
|
|
269
|
+
- [ ] **Error handling** - Graceful degradation if API fails
|
|
270
|
+
- [ ] **Performance testing** - Ensure no impact on logging performance
|
|
271
|
+
- [ ] **Cross-browser testing** - Chrome, Firefox, Safari compatibility
|
|
272
|
+
|
|
273
|
+
### **๐ฏ Success Criteria**
|
|
274
|
+
|
|
275
|
+
#### **Core Functionality**
|
|
276
|
+
- โ
**Zero bundle impact** when panel disabled
|
|
277
|
+
- โ
**Instant filtering** - No delay between toggle and console update
|
|
278
|
+
- โ
**State persistence** - Panel preferences survive page reloads
|
|
279
|
+
- โ
**Component discovery** - Automatically detects all available loggers
|
|
280
|
+
|
|
281
|
+
#### **User Experience**
|
|
282
|
+
- โ
**Intuitive interface** - Clear on/off states for each component
|
|
283
|
+
- โ
**Responsive feedback** - Immediate visual confirmation of changes
|
|
284
|
+
- โ
**Non-intrusive** - Panel doesn't interfere with page functionality
|
|
285
|
+
- โ
**Professional appearance** - Consistent with browser dev tools
|
|
286
|
+
|
|
287
|
+
#### **Technical Quality**
|
|
288
|
+
- โ
**No performance impact** - Logging performance unchanged
|
|
289
|
+
- โ
**Error resilience** - Panel failure doesn't break logging
|
|
290
|
+
- โ
**Memory efficiency** - Proper cleanup on panel close
|
|
291
|
+
- โ
**Cross-browser support** - Works in all major browsers
|
|
292
|
+
|
|
293
|
+
### **๐ฎ Future Enhancements**
|
|
294
|
+
|
|
295
|
+
#### **Advanced Filtering** (Phase 6.5)
|
|
296
|
+
- [ ] **File-level controls** - Panel interface for file overrides
|
|
297
|
+
- [ ] **Search filtering** - Filter logs by message content
|
|
298
|
+
- [ ] **Time-based filtering** - Show logs from specific time ranges
|
|
299
|
+
- [ ] **Log level visualization** - Visual indicators for different levels
|
|
300
|
+
|
|
301
|
+
#### **Integration Features** (Phase 6.6)
|
|
302
|
+
- [ ] **Browser extension** - Dedicated dev tools extension
|
|
303
|
+
- [ ] **Framework integration** - React/Vue dev tools integration
|
|
304
|
+
- [ ] **Export formats** - Save filtered logs to JSON/CSV
|
|
305
|
+
- [ ] **Remote debugging** - Panel for remote/mobile debugging
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## ๐ง Technical Decisions
|
|
310
|
+
|
|
311
|
+
### **Environment Detection Strategy**
|
|
312
|
+
- **Decision**: Use feature detection rather than user agent parsing
|
|
313
|
+
- **Rationale**: More reliable across different environments and versions
|
|
314
|
+
- **Implementation**: Check for `window`, `process`, and other environment markers
|
|
315
|
+
|
|
316
|
+
### **Browser Logger Architecture**
|
|
317
|
+
- **Decision**: Bypass Pino entirely in browser environments
|
|
318
|
+
- **Rationale**: Needed 100% control over console formatting for perfect output
|
|
319
|
+
- **Impact**: Significant breakthrough enabling beautiful browser console logs
|
|
320
|
+
|
|
321
|
+
### **Configuration Management**
|
|
322
|
+
- **Decision**: Hierarchical config with file > component > global precedence
|
|
323
|
+
- **Rationale**: Provides surgical debugging capability while maintaining simplicity
|
|
324
|
+
- **Benefits**: Can debug single files without noise from other components
|
|
325
|
+
|
|
326
|
+
### **Publishing Strategy**
|
|
327
|
+
- **Decision**: Scoped NPM package with public access
|
|
328
|
+
- **Rationale**: Namespace protection while maintaining free access
|
|
329
|
+
- **Package**: `@crimsonsunset/jsg-logger`
|
|
330
|
+
|
|
331
|
+
### **License Choice**
|
|
332
|
+
- **Decision**: ISC license with explicit "AS IS" disclaimer
|
|
333
|
+
- **Rationale**: Maximum flexibility with liability protection
|
|
334
|
+
- **Benefits**: Simple, permissive, legally protective
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## ๐ Recent Progress
|
|
339
|
+
|
|
340
|
+
### August 6, 2025 - NPM Publication & Documentation
|
|
341
|
+
- โ
**Package Publication** - JSG Logger v1.0.6 live on NPM
|
|
342
|
+
- โ
**Automated Scripts** - `npm run release` for easy publishing
|
|
343
|
+
- โ
**Legal Protection** - LICENSE file and disclaimer added
|
|
344
|
+
- โ
**Documentation Structure** - Added CHANGELOG, CONTRIBUTING, docs/
|
|
345
|
+
- โ
**DeskThing Migration** - Successfully replaced local logger with NPM package
|
|
346
|
+
- โ
**Old Folder Cleanup** - Removed original logger folder from DeskThing-Apps
|
|
347
|
+
|
|
348
|
+
### Key Learnings
|
|
349
|
+
- **Scoped Packages** - Need `--access public` flag for free publishing
|
|
350
|
+
- **Internal Imports** - Required multiple patch versions to fix relative paths
|
|
351
|
+
- **Vite Integration** - Seamless alias replacement with published package
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## ๐ฏ Success Metrics
|
|
356
|
+
|
|
357
|
+
### **Core Functionality** โ
ACHIEVED
|
|
358
|
+
- โ
**Environment Detection** - 100% reliable across browser/CLI/server
|
|
359
|
+
- โ
**Beautiful Output** - Console formatting exceeds expectations
|
|
360
|
+
- โ
**Runtime Controls** - Complete API for dynamic configuration
|
|
361
|
+
- โ
**File Precision** - Granular debugging without code changes
|
|
362
|
+
|
|
363
|
+
### **Distribution Success** โ
ACHIEVED
|
|
364
|
+
- โ
**NPM Package** - Published and functional
|
|
365
|
+
- โ
**Real Usage** - Successfully integrated in DeskThing-Apps
|
|
366
|
+
- โ
**Documentation** - Comprehensive guide with examples
|
|
367
|
+
- โ
**Legal Protection** - ISC license with "AS IS" clause
|
|
368
|
+
|
|
369
|
+
### **Quality Metrics** โ
ACHIEVED
|
|
370
|
+
- โ
**Zero Dependencies** - Only pino for server environments
|
|
371
|
+
- โ
**Small Bundle** - ~16KB compressed package
|
|
372
|
+
- โ
**Clean API** - Intuitive logger.controls interface
|
|
373
|
+
- โ
**Error Handling** - Graceful degradation in all environments
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## ๐จ Known Issues & Limitations
|
|
378
|
+
|
|
379
|
+
### **Current Limitations**
|
|
380
|
+
- **Server Logs** - Still uses Pino (intentional for production JSON)
|
|
381
|
+
- **Browser Storage** - Log store is memory-only (could add persistence)
|
|
382
|
+
- **Configuration** - No GUI for runtime config (DevTools panel planned)
|
|
383
|
+
|
|
384
|
+
### **Non-Issues**
|
|
385
|
+
- **Bundle Size** - Acceptable for most use cases (~16KB)
|
|
386
|
+
- **Performance** - No noticeable impact in testing
|
|
387
|
+
- **Compatibility** - Works across all tested environments
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
## ๐ฏ Next Steps
|
|
392
|
+
|
|
393
|
+
### **Immediate Priorities**
|
|
394
|
+
- None - logger is feature complete and stable
|
|
395
|
+
|
|
396
|
+
### **Optional Enhancements**
|
|
397
|
+
- **DevTools Panel** - Browser interface for log filtering
|
|
398
|
+
- **Performance Monitoring** - Track logging overhead
|
|
399
|
+
- **Framework Guides** - React, Vue, Svelte integration examples
|
|
400
|
+
|
|
401
|
+
### **Long-term Vision**
|
|
402
|
+
- **Community Adoption** - See if others find the package useful
|
|
403
|
+
- **Ecosystem Integration** - Framework-specific adapters if demand exists
|
|
404
|
+
- **Performance Optimization** - Only if usage patterns reveal bottlenecks
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"projectName": "Advanced CACP Logger Demo",
|
|
3
|
+
"globalLevel": "info",
|
|
4
|
+
"timestampMode": "absolute",
|
|
5
|
+
"format": {
|
|
6
|
+
"style": "brackets",
|
|
7
|
+
"componentCase": "upper",
|
|
8
|
+
"timestamp": "HH:mm:ss.SSS"
|
|
9
|
+
},
|
|
10
|
+
"display": {
|
|
11
|
+
"timestamp": true,
|
|
12
|
+
"emoji": true,
|
|
13
|
+
"component": true,
|
|
14
|
+
"level": false,
|
|
15
|
+
"message": true,
|
|
16
|
+
"jsonPayload": true,
|
|
17
|
+
"stackTrace": true
|
|
18
|
+
},
|
|
19
|
+
"components": {
|
|
20
|
+
"cacp": {
|
|
21
|
+
"emoji": "๐ฏ",
|
|
22
|
+
"color": "#4A90E2",
|
|
23
|
+
"name": "CACP-Core",
|
|
24
|
+
"level": "debug"
|
|
25
|
+
},
|
|
26
|
+
"soundcloud": {
|
|
27
|
+
"emoji": "๐ต",
|
|
28
|
+
"color": "#FF5500",
|
|
29
|
+
"name": "SoundCloud",
|
|
30
|
+
"level": "trace"
|
|
31
|
+
},
|
|
32
|
+
"youtube": {
|
|
33
|
+
"emoji": "๐น",
|
|
34
|
+
"color": "#FF0000",
|
|
35
|
+
"name": "YouTube",
|
|
36
|
+
"level": "info"
|
|
37
|
+
},
|
|
38
|
+
"site-detector": {
|
|
39
|
+
"emoji": "๐",
|
|
40
|
+
"color": "#00C896",
|
|
41
|
+
"name": "SiteDetector",
|
|
42
|
+
"level": "debug"
|
|
43
|
+
},
|
|
44
|
+
"websocket": {
|
|
45
|
+
"emoji": "๐",
|
|
46
|
+
"color": "#9B59B6",
|
|
47
|
+
"name": "WebSocket",
|
|
48
|
+
"level": "warn"
|
|
49
|
+
},
|
|
50
|
+
"popup": {
|
|
51
|
+
"emoji": "๐๏ธ",
|
|
52
|
+
"color": "#FF6B6B",
|
|
53
|
+
"name": "Popup",
|
|
54
|
+
"level": "debug"
|
|
55
|
+
},
|
|
56
|
+
"background": {
|
|
57
|
+
"emoji": "๐ง",
|
|
58
|
+
"color": "#4ECDC4",
|
|
59
|
+
"name": "Background",
|
|
60
|
+
"level": "info"
|
|
61
|
+
},
|
|
62
|
+
"priority-manager": {
|
|
63
|
+
"emoji": "โ๏ธ",
|
|
64
|
+
"color": "#45B7D1",
|
|
65
|
+
"name": "PriorityManager",
|
|
66
|
+
"level": "warn"
|
|
67
|
+
},
|
|
68
|
+
"settings": {
|
|
69
|
+
"emoji": "โ๏ธ",
|
|
70
|
+
"color": "#96CEB4",
|
|
71
|
+
"name": "Settings",
|
|
72
|
+
"level": "info"
|
|
73
|
+
},
|
|
74
|
+
"test": {
|
|
75
|
+
"emoji": "๐งช",
|
|
76
|
+
"color": "#FFEAA7",
|
|
77
|
+
"name": "Test",
|
|
78
|
+
"level": "trace"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"fileOverrides": {
|
|
82
|
+
"src/sites/soundcloud.js": {
|
|
83
|
+
"level": "trace",
|
|
84
|
+
"component": "soundcloud",
|
|
85
|
+
"emoji": "๐ต",
|
|
86
|
+
"display": {
|
|
87
|
+
"timestamp": true,
|
|
88
|
+
"emoji": true,
|
|
89
|
+
"component": true,
|
|
90
|
+
"level": true,
|
|
91
|
+
"message": true,
|
|
92
|
+
"jsonPayload": true,
|
|
93
|
+
"stackTrace": true
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"src/managers/*.js": {
|
|
97
|
+
"level": "warn",
|
|
98
|
+
"display": {
|
|
99
|
+
"jsonPayload": false
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"src/popup.js": {
|
|
103
|
+
"level": "debug",
|
|
104
|
+
"emoji": "๐๏ธ",
|
|
105
|
+
"timestampMode": "relative",
|
|
106
|
+
"display": {
|
|
107
|
+
"timestamp": true,
|
|
108
|
+
"emoji": true,
|
|
109
|
+
"component": true,
|
|
110
|
+
"level": false,
|
|
111
|
+
"message": true,
|
|
112
|
+
"jsonPayload": false,
|
|
113
|
+
"stackTrace": true
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"src/background.js": {
|
|
117
|
+
"level": "info",
|
|
118
|
+
"display": {
|
|
119
|
+
"jsonPayload": false,
|
|
120
|
+
"stackTrace": false
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"src/cacp.js": {
|
|
124
|
+
"level": "debug",
|
|
125
|
+
"emoji": "๐ฏ",
|
|
126
|
+
"display": {
|
|
127
|
+
"level": true,
|
|
128
|
+
"jsonPayload": true
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"src/sites/youtube.js": {
|
|
132
|
+
"level": "info",
|
|
133
|
+
"emoji": "๐น",
|
|
134
|
+
"timestampMode": "readable",
|
|
135
|
+
"display": {
|
|
136
|
+
"timestamp": true,
|
|
137
|
+
"jsonPayload": false
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"src/test-*.js": {
|
|
141
|
+
"level": "trace",
|
|
142
|
+
"emoji": "๐งช",
|
|
143
|
+
"timestampMode": "disable",
|
|
144
|
+
"display": {
|
|
145
|
+
"timestamp": false,
|
|
146
|
+
"level": true,
|
|
147
|
+
"jsonPayload": true
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|