1 | import log from 'npmlog';
|
2 | import { getProductVariables } from './cli';
|
3 |
|
4 | log.level = process.env.DISABLE_LOGGING === 'true' ? 'silent' : process.env.LOG_LEVEL || 'info';
|
5 |
|
6 | export function createLogger(prefix) {
|
7 | log.heading = prefix;
|
8 | return log;
|
9 | }
|
10 |
|
11 | export const separator = '=========================';
|
12 |
|
13 | const names = getProductVariables();
|
14 |
|
15 | export default createLogger(names.product);
|