Module: Logger

Debug logger utility gated behind ?debug URL parameter. In production, only warnings and errors are emitted. Enable debug output by appending ?debug to the page URL.

Author:
  • Hack23 AB
License:
  • Apache-2.0
Source:
Example
// Enable debug logging:
// https://riksdagsmonitor.com/?debug

import { logger } from './logger.js';
logger.debug('Loading CSV:', filename);
logger.error('Failed to load:', error);

Members

(static, constant) logger

Structured logger with debug gating. debug/info messages are suppressed unless ?debug is present in the URL.

Source: