Skip to content

Commit

Permalink
feat: add error log formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Jul 15, 2024
1 parent d5c2d41 commit 976c4cd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function linkRegistryProject(
.warn('Project could not be created.', {
component: 'registry',
command: RegistryCommand.PROJECT_LINK,
});
}, e);

throw e;
}
Expand Down Expand Up @@ -104,7 +104,7 @@ export async function linkRegistryProject(
.warn('Robot account could not be created.', {
component: 'registry',
command: RegistryCommand.PROJECT_LINK,
});
}, e);

throw e;
}
Expand All @@ -128,7 +128,7 @@ export async function linkRegistryProject(
.warn('Webhook could not be created.', {
component: 'registry',
command: RegistryCommand.PROJECT_LINK,
});
}, e);

throw e;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function unlinkRegistryProject(
.warn('Project repositories could not be deleted.', {
component: 'registry',
command: RegistryCommand.PROJECT_UNLINK,
});
}, e);

throw e;
}
Expand All @@ -58,7 +58,7 @@ export async function unlinkRegistryProject(
.warn('Project could not be deleted.', {
component: 'registry',
command: RegistryCommand.PROJECT_UNLINK,
});
}, e);

throw e;
}
Expand All @@ -72,7 +72,7 @@ export async function unlinkRegistryProject(
.warn('Robot Account could not be deleted.', {
component: 'registry',
command: RegistryCommand.PROJECT_UNLINK,
});
}, e);
}
}

Expand All @@ -83,7 +83,7 @@ export async function unlinkRegistryProject(
.warn('Vault project representation could not be deleted.', {
component: 'registry',
command: RegistryCommand.PROJECT_UNLINK,
});
}, e);

throw e;
}
Expand Down
1 change: 1 addition & 0 deletions packages/server-kit/src/services/logger/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function createLogger(ctx: LoggerCreateContext = {}) : Logger {

return create({
format: format.combine(
format.errors({ stack: true }),
format.timestamp(),
format.colorize(),
format.simple(),
Expand Down

0 comments on commit 976c4cd

Please sign in to comment.