C
C
crdrads2019-01-29 20:51:33
JavaScript
crdrads, 2019-01-29 20:51:33

How to make output different color in debug?

DEBUG=error,info

const error = require('debug')('error')
const info = require('debug')('info')

error('from the worker')
info('from the worker')

How to make a different color?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Klimanov, 2019-01-29
@ahmpro

look towards console escape sequences
or packages
https://www.npmjs.com/package/colors
https://www.npmjs.com/package/cli-color

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question