Add logger to the server
- add logger with interceptor for requests
Change-Id: Iecb6b6e51c28aadcc4eec3bb69dc38f4e0e346c5
Issue-ID: CCSDK-1295
Signed-off-by: Rami <rmohamed.ext@orange.com>
diff --git a/cds-ui/server/src/index.ts b/cds-ui/server/src/index.ts
index 0485249..3afc0a7 100644
--- a/cds-ui/server/src/index.ts
+++ b/cds-ui/server/src/index.ts
@@ -19,9 +19,9 @@
============LICENSE_END============================================
*/
-import { CdsUiServerApplication } from './application';
import { ApplicationConfig } from '@loopback/core';
-
+import { CdsUiServerApplication } from './application';
+import { logger } from './logger/logger';
export { CdsUiServerApplication };
export async function main(options: ApplicationConfig = {}) {
@@ -30,8 +30,8 @@
await app.start();
const url = app.restServer.url;
- console.log(`Server is running at ${url}`);
- console.log(`Try ${url}/ping`);
+ logger.info(`Server is running at ${url}`);
+ logger.info(`Try ${url}/ping`);
return app;
}