mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-3821] Add lite-serve with VSCode launcher (#1584)
* Add lite-serve with VSCode launcher * Make lite-serve smarter to work with Basic authtype as well * Change and unify app-config-replace script
This commit is contained in:
26
tools/helpers/logger.js
Normal file
26
tools/helpers/logger.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const { createLogger, transports, format } = require('winston');
|
||||
const { yellow, green, red, blue, magenta, cyan } = require('chalk');
|
||||
|
||||
const levels = {
|
||||
error: red,
|
||||
warn: yellow,
|
||||
info: cyan,
|
||||
verbose: magenta,
|
||||
debug: green,
|
||||
silly: blue
|
||||
};
|
||||
|
||||
const myFormat = format.printf(({ level, message, label, timestamp }) => {
|
||||
return `[${levels[level](timestamp)}]: ${message}`;
|
||||
});
|
||||
|
||||
module.exports = createLogger({
|
||||
level: 'silly',
|
||||
format: format.combine(
|
||||
// format.splat(),
|
||||
format.timestamp(),
|
||||
format.prettyPrint(),
|
||||
myFormat
|
||||
),
|
||||
transports: [new transports.Console()]
|
||||
});
|
Reference in New Issue
Block a user