Skip to content

Commit

Permalink
Fix logger code example
Browse files Browse the repository at this point in the history
  • Loading branch information
pwizla authored Nov 29, 2023
1 parent a19f114 commit e61f146
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions docusaurus/docs/dev-docs/configurations/middlewares.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ const {
formats: { prettyPrint, levelFilter },
} = require('@strapi/logger');

module.exports = [
module.exports = {
transports: [
new winston.transports.Console({
level: 'http',
Expand All @@ -498,7 +498,7 @@ module.exports = [
),
}),
],
];
};
```

</TabItem>
Expand All @@ -512,19 +512,17 @@ module.exports = [
import winston from 'winston';
import { prettyPrint, levelFilter } from 'winston.format';

export default [
{
transports: [
new winston.transports.Console({
level: 'http',
format: winston.format.combine(
levelFilter('http'),
prettyPrint({ timestamps: 'YYYY-MM-DD hh:mm:ss.SSS' })
),
}),
],
},
];
export default {
transports: [
new winston.transports.Console({
level: 'http',
format: winston.format.combine(
levelFilter('http'),
prettyPrint({ timestamps: 'YYYY-MM-DD hh:mm:ss.SSS' })
),
}),
],
};
```

</TabItem>
Expand Down

1 comment on commit e61f146

@vercel
Copy link

@vercel vercel bot commented on e61f146 Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

documentation – ./

documentation-git-main-strapijs.vercel.app
docs-vercel-v4.strapi.io
documentation-strapijs.vercel.app

Please sign in to comment.