mirror of
https://github.com/strapi/strapi.git
synced 2025-08-07 08:16:35 +00:00
21 lines
542 B
JavaScript
21 lines
542 B
JavaScript
'use strict';
|
|
|
|
const { transports } = require('winston');
|
|
const { LEVEL_LABEL, LEVELS } = require('../constants');
|
|
const { prettyPrint } = require('../formats');
|
|
const { excludeColors } = require('../formats');
|
|
|
|
const createOutputFileConfiguration = (filename) => {
|
|
return {
|
|
level: LEVEL_LABEL,
|
|
levels: LEVELS,
|
|
format: prettyPrint(),
|
|
transports: [
|
|
new transports.Console(),
|
|
new transports.File({ level: 'error', filename, format: excludeColors }),
|
|
],
|
|
};
|
|
};
|
|
|
|
module.exports = createOutputFileConfiguration;
|