mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
chore: remove logger in gateway (#5775)
This commit is contained in:
parent
6c3eb4a40e
commit
17bcdcab6a
@ -178,9 +178,7 @@ export class Gateway extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
responseErrorWithCode(code, res, options) {
|
responseErrorWithCode(code, res, options) {
|
||||||
const log = this.getLogger(options.appName, res);
|
|
||||||
const error = applyErrorWithArgs(getErrorWithCode(code), options);
|
const error = applyErrorWithArgs(getErrorWithCode(code), options);
|
||||||
log.error(error.message, { method: 'responseErrorWithCode', error });
|
|
||||||
this.responseError(res, error);
|
this.responseError(res, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,8 +231,6 @@ export class Gateway extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleApp = await this.getRequestHandleAppName(req as IncomingRequest);
|
const handleApp = await this.getRequestHandleAppName(req as IncomingRequest);
|
||||||
const log = this.getLogger(handleApp, res);
|
|
||||||
|
|
||||||
const hasApp = AppSupervisor.getInstance().hasApp(handleApp);
|
const hasApp = AppSupervisor.getInstance().hasApp(handleApp);
|
||||||
|
|
||||||
if (!hasApp) {
|
if (!hasApp) {
|
||||||
@ -244,7 +240,6 @@ export class Gateway extends EventEmitter {
|
|||||||
let appStatus = AppSupervisor.getInstance().getAppStatus(handleApp, 'initializing');
|
let appStatus = AppSupervisor.getInstance().getAppStatus(handleApp, 'initializing');
|
||||||
|
|
||||||
if (appStatus === 'not_found') {
|
if (appStatus === 'not_found') {
|
||||||
log.warn(`app not found`, { method: 'requestHandler' });
|
|
||||||
this.responseErrorWithCode('APP_NOT_FOUND', res, { appName: handleApp });
|
this.responseErrorWithCode('APP_NOT_FOUND', res, { appName: handleApp });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -263,7 +258,6 @@ export class Gateway extends EventEmitter {
|
|||||||
const app = await AppSupervisor.getInstance().getApp(handleApp);
|
const app = await AppSupervisor.getInstance().getApp(handleApp);
|
||||||
|
|
||||||
if (appStatus !== 'running') {
|
if (appStatus !== 'running') {
|
||||||
log.warn(`app is not running`, { method: 'requestHandler', status: appStatus });
|
|
||||||
this.responseErrorWithCode(`${appStatus}`, res, { app, appName: handleApp });
|
this.responseErrorWithCode(`${appStatus}`, res, { app, appName: handleApp });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user