|
@@ -38,7 +38,7 @@ import { UserRegisteredEventHandler } from '../Domain/Handler/UserRegisteredEven
|
|
|
import { SubscriptionCancelledEventHandler } from '../Domain/Handler/SubscriptionCancelledEventHandler'
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
|
-const newrelicWinstonEnricher = require('@newrelic/winston-enricher')
|
|
|
+const newrelicFormatter = require('@newrelic/winston-enricher')
|
|
|
|
|
|
export class ContainerConfigLoader {
|
|
|
async load(): Promise<Container> {
|
|
@@ -60,9 +60,10 @@ export class ContainerConfigLoader {
|
|
|
|
|
|
container.bind(TYPES.Redis).toConstantValue(redis)
|
|
|
|
|
|
+ const newrelicWinstonFormatter = newrelicFormatter(winston)
|
|
|
const winstonFormatters = [winston.format.splat(), winston.format.json()]
|
|
|
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
|
|
|
- winstonFormatters.push(newrelicWinstonEnricher(winston))
|
|
|
+ winstonFormatters.push(newrelicWinstonFormatter())
|
|
|
}
|
|
|
|
|
|
const logger = winston.createLogger({
|