web-crawling-utils
Version:
Common useful utils for web crawling and automation scripts
15 lines (14 loc) • 537 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const winston_1 = require("winston");
const logger = (0, winston_1.createLogger)({
level: 'info',
format: winston_1.format.combine(winston_1.format.timestamp(), winston_1.format.printf(({ timestamp, level, message }) => {
return `${timestamp} [${level}]: ${message}`;
})),
transports: [
new winston_1.transports.Console(),
new winston_1.transports.File({ filename: 'logs/app.log' })
],
});
exports.default = logger;