@athenna/http 3.0.8 → 3.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenna/http",
3
- "version": "3.0.8",
3
+ "version": "3.0.10",
4
4
  "description": "The Athenna Http server. Built on top of fastify.",
5
5
  "license": "MIT",
6
6
  "author": "João Lenon <lenon@athenna.io>",
@@ -57,11 +57,11 @@
57
57
  "fastify": "4.9.2"
58
58
  },
59
59
  "devDependencies": {
60
- "@athenna/artisan": "3.0.8",
60
+ "@athenna/artisan": "3.0.9",
61
61
  "@athenna/common": "3.0.2",
62
62
  "@athenna/config": "3.0.4",
63
63
  "@athenna/ioc": "3.0.2",
64
- "@athenna/logger": "3.0.7",
64
+ "@athenna/logger": "3.0.9",
65
65
  "@fastify/cors": "8.1.1",
66
66
  "@fastify/helmet": "10.0.2",
67
67
  "@fastify/rate-limit": "7.5.0",
@@ -61,6 +61,8 @@ export class HttpExceptionHandler {
61
61
  delete body.stack
62
62
  }
63
63
 
64
+ response.status(statusCode).send(body)
65
+
64
66
  if (
65
67
  this.ignoreCodes.includes(code) ||
66
68
  this.ignoreStatuses.includes(statusCode)
@@ -70,8 +72,9 @@ export class HttpExceptionHandler {
70
72
 
71
73
  const logger = Config.exists('logging.channels.exception')
72
74
  ? Log.channel('exception')
73
- : Logger.getConsoleLogger({
75
+ : Logger.getVanillaLogger({
74
76
  level: 'trace',
77
+ driver: 'console',
75
78
  streamType: 'stderr',
76
79
  formatter: 'none',
77
80
  })
@@ -81,7 +84,5 @@ export class HttpExceptionHandler {
81
84
  }
82
85
 
83
86
  logger.error((await error.prettify()).concat('\n'))
84
-
85
- return response.status(statusCode).send(body)
86
87
  }
87
88
  }
@@ -187,8 +187,9 @@ export class HttpKernel {
187
187
  Server.use(async ctx => {
188
188
  const logger = Config.exists('logging.channels.request')
189
189
  ? Log.channel('request')
190
- : Logger.getConsoleLogger({
190
+ : Logger.getVanillaLogger({
191
191
  level: 'trace',
192
+ driver: 'console',
192
193
  formatter: 'none',
193
194
  })
194
195