Skip to content

Commit

Permalink
feat(metrics): log directly to stdout (#1786)
Browse files Browse the repository at this point in the history
* chore(commons): move isDevMode to commons

* chore(logger): move isDev config out of logger to commons

* feat(metrics): use own console object by default

* tests(layers): fix unit tests
  • Loading branch information
dreamorosi committed Feb 20, 2024
1 parent 948543d commit f0dd4c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/metrics/tests/unit/middleware/middy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ describe('Middy middleware', () => {
serviceName: 'orders',
});
const consoleSpy = jest.spyOn(metrics['console'], 'log');
const handler = middy(() => {
const handler = middy(async (): Promise<void> => {
metrics.addMetric('successfulBooking', MetricUnit.Count, 2);
metrics.addMetric('successfulBooking', MetricUnit.Count, 1);
}).use(logMetrics(metrics));
Expand Down

0 comments on commit f0dd4c0

Please sign in to comment.