Skip to content

Commit

Permalink
fix(kernel): log service name on bootstrap failure (#679)
Browse files Browse the repository at this point in the history
* log service name if register fails

* log service name if bootstrap fails
  • Loading branch information
oXtxNt9U authored Aug 22, 2024
1 parent 1d5f57a commit 14d9dfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/kernel/source/bootstrap/boot-service-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class BootServiceProviders implements Contracts.Kernel.Bootstrapper {
try {
await this.serviceProviders.boot(name);
} catch (error) {
this.logger.error(error.stack);
this.logger.error(`${name}: ${error.stack}`);
const isRequired: boolean = await serviceProvider.required();

if (isRequired) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class RegisterServiceProviders implements Contracts.Kernel.Bootstrapper {
await serviceProviders.register(name);
}
} catch (error) {
console.error(error.stack);
this.logger.error(`${name}: ${error.stack}`);

// Determine if the plugin is required to decide how to handle errors.
const isRequired: boolean = await serviceProvider.required();
Expand Down

0 comments on commit 14d9dfa

Please sign in to comment.