Skip to content

v0.42.0 - AfterGlow v2 Logger (2026-03-25)

What Changed?

This release introduces the v2 AfterGlow logger module (src/v2/afterglow.ts). The new logger adopts a singleton design — all logs from a single GAS execution are accumulated in one globalLogger instance. It also adds CategoryLogger as a lightweight facade for category-scoped logging, replacing the named registry approach in v1.


What's New

Main Feature: AfterGlow v2 Logger

What it does: A lightweight buffered logging system for GAS and JavaScript. Logs are stored as Ember entries in memory and can be exported as a BareFrame for analysis. Supports lazy (in-memory only) and eager (immediate output) modes with level filtering.

How to use it:

  1. Get the singleton logger via getLogger()
  2. Optionally configure it with logger.configure()
  3. Log messages using info, warn, error, or debug
  4. Export logs as a BareFrame with toDataFrame()

Code example:

TypeScript
import { getLogger, getCategoryLogger, clearLogs } from './afterglow';

// Configure and log
const logger = getLogger();
logger.configure({ logLevel: 'debug', logMode: 'eager' });

logger.info('Application started');
logger.warn('High memory usage', { values: [85, 'percent'], category: 'perf' });
logger.error('Database error', { category: 'database' });

// Category-scoped logging
const authLogger = getCategoryLogger('auth');
authLogger.info('User logged in', { values: ['user123'] });

// Export logs as BareFrame
const df = logger.toDataFrame();
const errors = df.filter(row => row.level === 'error');

Added

  • src/v2/afterglow.ts — v2 AfterGlow logger module
  • AfterGlow class with log, info, warn, error, debug, configure, toMap, toDataFrame, clear methods
  • CategoryLogger class for category-scoped logging with log, info, warn, error, debug methods
  • getLogger() — returns the global singleton AfterGlow instance
  • clearLogs() — clears all logs from the global singleton
  • getCategoryLogger(category) — creates a CategoryLogger wrapping the global singleton
  • Ember interface — structured log entry type
  • EmberOptions, LoggerOptions interfaces
  • LogLevel, LogMode type aliases

Changed

  • AfterGlow.configure(options) replaces the removed applyLoggerOptions() and configureLogger() functions
  • values field in toMap() is serialized as JSON string for Cell[] type compatibility
  • Caller detection in _getCallerName() now skips internal frames by matching afterglow.ts in the stack trace

Is It Safe to Upgrade?

  • Breaking Changes: No (v2 is additive; v1 src/afterglow/ is unchanged)
  • Backward Compatible: Yes

v1 afterglow (src/afterglow/) remains unchanged. The v2 module is a new addition in src/v2/afterglow.ts.


Release Details

  • Date: 2026-03-25
  • Version: v0.42.0
  • gaslamp: version 93
  • pilotlamp: version 50
  • Files Changed: 179
  • Commits:
    • 0be41f0 docs: update README and CLAUDE.md to reflect v2 AfterGlow module
    • cd3472c docs(afterglow): update docstrings with accurate descriptions and examples
    • 0380887 refactor(afterglow): replace applyLoggerOptions/configureLogger with AfterGlow.configure()
    • c4f6dc7 docs(afterglow): add @since 0.42.0 to all public API symbols in v2
    • b795114 feat(afterglow): add v2 AfterGlow logger module
    • cb3fa11 docs(api): regenerate TypeDoc API reference
    • 1aa738f docs(flamewright): add @deprecated Since 0.42.0 to symbols migrated to src/v2/flame.ts
    • 4f125bf docs(dataframe): update @deprecated tags to Since 0.42.0 and BareFrame
    • 5238217 docs: rename DataFrameV2 to BareFrame in guides and getting-started

Known Issues

  • _getCallerName() may return "unknown" in bundled GAS environments where filename information is absent from the stack trace.
  • v2 AfterGlow is not yet exported from src/v2/index.ts — direct import from src/v2/afterglow.ts is required.

Next Steps

  • Export v2 AfterGlow from src/v2/index.ts and register in src/index.ts for GAS global namespace
  • Write __tests__/v2/afterglow.test.ts for v2 AfterGlow coverage