Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/core",
"version": "5.14.0",
"version": "5.15.0",
"description": "One foundation for multiple applications.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down
3 changes: 1 addition & 2 deletions src/applications/Http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export class Http {
options = Options.create(options, {
host: Config.get('http.host', '127.0.0.1'),
port: Config.get('http.port', 3000),
trace: Config.get('http.trace', false),
routePath: Path.routes(`http.${Path.ext()}`),
kernelPath: '@athenna/http/kernels/HttpKernel'
})
Expand Down Expand Up @@ -83,7 +82,7 @@ export class Http {
await kernel.registerSwagger()
await kernel.registerVite()
await kernel.registerRateLimit()
await kernel.registerRTracer(options.trace)
await kernel.registerRTracer()
await kernel.registerLoggerTerminator()
await kernel.registerRoutes(options.routePath)

Expand Down
20 changes: 20 additions & 0 deletions src/ignite/Ignite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,26 @@ export class Ignite extends Macroable {
error = error.toAthennaException()
}

const isUsingJsonFormatter = Config.is(
'logging.channels.exception.formatter',
'json'
)

if (isUsingJsonFormatter) {
await Log.channelOrVanilla('exception').fatal({
name: error.name,
code: error.code,
status: error.status,
message: error.message,
help: error.help,
cause: error.cause,
details: error.details,
stack: error.stack
})

return
}

await Log.channelOrVanilla('exception').fatal(await error.prettify())

process.exit(1)
Expand Down
7 changes: 0 additions & 7 deletions src/types/HttpOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ export type HttpOptions = {
*/
port?: number

/**
* Create a custom trace uuid to all new requests done to the server using AsyncLocalStorage.
*
* @default Config.get('http.trace', false)
*/
trace?: boolean

/**
* The path to the http routes.
*
Expand Down
Loading