Skip to content

Commit 7a63bd8

Browse files
authored
Add LokiTransport to logger configuration
1 parent eac849a commit 7a63bd8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

importer-db-api/src/utils/logger.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ if (!IS_DEV) {
3838
transports.push(new winston.transports.Console({ format: prodFormat }))
3939
}
4040

41+
transports.push(
42+
new LokiTransport({
43+
host: 'http://loki-svc.toska-lokki.svc.cluster.local:3100',
44+
labels: { app: 'importer-db-api', environment: process.env.NODE_ENV || 'production' }
45+
})
46+
)
47+
4148
const logger = winston.createLogger({ transports })
4249

4350
module.exports = logger

0 commit comments

Comments
 (0)