diff --git a/src/utils/logger.js b/src/utils/logger.js new file mode 100644 index 00000000..371d7df3 --- /dev/null +++ b/src/utils/logger.js @@ -0,0 +1,15 @@ +import { createLogger, format, transports } from 'winston' + +const logger = createLogger({ + format: format.combine( + format.timestamp(), + format.json() + ), + defaultMeta: { service: 'lpa-data-validation-frontend' }, + transports: [ + new transports.Console(), + new transports.File({ filename: 'combined.log' }) + ] +}) + +export default logger