Détail du package

@universal-packages/logger-terminal-presenter

universal-packages38.5kMIT1.2.2

Universal logger transport for the universal terminal presenter

readme

Logger Terminal Presenter Transport

npm version Testing codecov

Terminal presenter transport for the universal logger where TerminalPresenter is present.

Install

npm install @universal-packages/logger-terminal-presenter

npm install @universal-packages/terminal-presenter-transport

TerminalPresenterTransport

By installing the package you can configure the logger to use it by name.

Avoid the default terminal transport that comes with the logger package since it will conflict with the terminal presenter functionality.

import { Logger } from '@universal-packages/logger'

const logger = new Logger({ transports: ['terminal-presenter', 'local-file'] })

Log configuration

When printing categories you can configure the background color and the text color. See TerminalDocument Colors.

logger.log({ level: 'INFO', message: 'Hello World', category: 'MY_APP' }, { categoryBackgroundColor: 'red', categoryColor: 'white' })

Typescript

This library is developed in TypeScript and shipped fully typed.

Contributing

The development of this library happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving this library.

License

MIT licensed.