refactor(core): Use logger for packages/cli messages (no-changelog) (#9302)

This commit is contained in:
Iván Ovejero
2024-05-03 15:24:27 +02:00
committed by GitHub
parent b65e0e2811
commit 7bda92cc7c
15 changed files with 63 additions and 46 deletions

View File

@@ -154,7 +154,7 @@ export abstract class AbstractServer {
this.server.on('error', (error: Error & { code: string }) => {
if (error.code === 'EADDRINUSE') {
console.log(
this.logger.info(
`n8n's port ${PORT} is already in use. Do you have another instance of n8n running already?`,
);
process.exit(1);
@@ -167,7 +167,7 @@ export abstract class AbstractServer {
await this.setupHealthCheck();
console.log(`n8n ready on ${ADDRESS}, port ${PORT}`);
this.logger.info(`n8n ready on ${ADDRESS}, port ${PORT}`);
}
async start(): Promise<void> {
@@ -236,11 +236,11 @@ export abstract class AbstractServer {
await this.configure();
if (!inTest) {
console.log(`Version: ${N8N_VERSION}`);
this.logger.info(`Version: ${N8N_VERSION}`);
const defaultLocale = config.getEnv('defaultLocale');
if (defaultLocale !== 'en') {
console.log(`Locale: ${defaultLocale}`);
this.logger.info(`Locale: ${defaultLocale}`);
}
await this.externalHooks.run('n8n.ready', [this, config]);