Skip to content

Commit

Permalink
created the logger
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Dec 4, 2023
1 parent dc746a9 commit 15fa028
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/utils/logger.js
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 15fa028

Please sign in to comment.