Skip to content
Samuel Voeller edited this page Aug 15, 2022 · 3 revisions

Amethyst Standard Libraries - amethyst-std - xCykrix

Table of Contents

Standard Libraries

Standard Logger

Module Path: https://raw.githubusercontent.com/amethyst-studio/amethyst-std/main/lib/logger/logger.ts

Versioned Path: https://raw.githubusercontent.com/amethyst-studio/amethyst-std/COMMIT_HASH/lib/logger/logger.ts

API
import { LoggingManager } from 'https://raw.githubusercontent.com/amethyst-studio/amethyst-std/main/lib/logger/logger.ts';

LoggerManager.configure({
  definition: {
    '': {
      level: LoggerLevel.Trace,
      location: false,
    },
  },
});

const logger = Logger.getLogger('definition');
logger.emit({
  content: 'your main message',
  context: {
    optional: 'object',
  }
})