Skip to content

transcend-io/logger

Repository files navigation

Transcend Browser Logger

A logger with style


Table of Contents

Usage example

This example snippet outputs [log tag] red blue green [interactive object] in your console with relevant styles and native console interactivity

import { createLogger } from '@transcend-io/logger';

const logger = createLogger();

logger.tag('[log tag]', () => {
  logger.log.styled(
    ['color:red', 'color:blue', 'color:green'],
    '%cred %cblue %cgreen',
    { rich: 'object', interactive: true },
  );
});