tracix
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

traceflow

A lightweight, customizable logging library for TypeScript applications that enhances logging for log-heavy apps like backends.

Features

  • Standarized formatting
  • Supports multiple log levels (debug, info, warn, error, silly)
  • Colorizes log messages based on log level
  • Customizable colors and styles for log levels using ColorKey

Usage

Basic Usage

See ./playground/example.ts.

const logger = new Logger('main')

logger.info('Hello, world!')
logger.warn('A new version of a is available: 3.0.1')
logger.silly('Project built!')
logger.trace('We are here now')
logger.debug('Fetched data')
logger.error(new Error('This is an example error. Everything is fine!'))

logger.info({ this: 'is', a: 'plain', javascript: 'object' })

Copyright (c) 2024 taskylizard. CC0.

Readme

Keywords

none

Package Sidebar

Install

npm i tracix

Weekly Downloads

0

Version

1.0.0

License

CC0-1.0

Unpacked Size

110 kB

Total Files

8

Last publish

Collaborators

  • taskylizard