Terminal presenter transport for the universal logger where TerminalPresenter is present.
npm install @universal-packages/logger-terminal-presenter
npm install @universal-packages/terminal-presenter-transport
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'] })
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' })
This library is developed in TypeScript and shipped fully typed.
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.