Commit ef88c73001881ce5f8d8017f4a8444a311ed208b

Authored by Adhidarma Hadiwinoto
1 parent 0408bedd1d
Exists in master and in 1 other branch dev

Use server.address().port on core callback listen log

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

lib/core-callback/index.js
... ... @@ -34,8 +34,8 @@ app.use((req, res) => {
34 34 const port = (config.listener && config.listener.core && config.listener.core.port)
35 35 || DEFAULT_LISTENER_FROM_CORE;
36 36  
37   -app.listen(port, () => {
38   - logger.info(`${MODULE_NAME} 0375DC4E: Listen from CORE callback on port ${port}`);
  37 +const server = app.listen(port, () => {
  38 + logger.info(`${MODULE_NAME} 0375DC4E: Listen from CORE callback`, { port: server.address().port });
39 39 }).on('error', (e) => {
40 40 logger.error(`${MODULE_NAME} A90E42D5: Can not listen CORE callback on port ${port}. ${e.toString()}`);
41 41 process.exit(1);