Skip to content

Commit

Permalink
Fix code example for Winston logger
Browse files Browse the repository at this point in the history
  • Loading branch information
pwizla authored Sep 21, 2023
1 parent 9c52f6e commit 612423f
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions docusaurus/docs/dev-docs/configurations/middlewares.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,18 +509,21 @@ module.exports = [

'use strict';

import { winston, formats: { prettyPrint, levelFilter }} from '@strapi/logger';
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' })
),
}),
],
{
transports: [
new winston.transports.Console({
level: 'http',
format: winston.format.combine(
levelFilter('http'),
prettyPrint({ timestamps: 'YYYY-MM-DD hh:mm:ss.SSS' })
),
}),
],
},
];
```

Expand Down

1 comment on commit 612423f

@vercel
Copy link

@vercel vercel bot commented on 612423f Sep 21, 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.