11 lines
372 B
JavaScript
11 lines
372 B
JavaScript
let winston = require("winston");
|
|
const { createLogger, format } = require("winston");
|
|
const { combine, timestamp, prettyPrint, label } = format;
|
|
|
|
let logger = createLogger({
|
|
format: combine(label({ label: "UDOHAIKU" }), timestamp(), winston.format.json()),
|
|
transports: [new winston.transports.File({ filename: "./logs/combined.log" })],
|
|
});
|
|
|
|
module.exports = logger;
|