@superhero/core 4.0.11 → 4.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +8 -5
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -103,8 +103,8 @@ export default class Core
103
103
  Core.#destroyerIsTriggered = true
104
104
 
105
105
  signal
106
- ? Core.log.info`graceful shutdown initiated ${signal}`
107
- : Core.log.info`graceful shutdown initiated`
106
+ ? Core.log.warn`graceful shutdown initiated ${signal}`
107
+ : Core.log.warn`graceful shutdown initiated`
108
108
 
109
109
  const
110
110
  destroyedCores = [],
@@ -283,6 +283,8 @@ export default class Core
283
283
  */
284
284
  async bootstrap(freeze = true)
285
285
  {
286
+ Object.assign(Log.default, this.config.find('log'))
287
+
286
288
  if(this.#isForked)
287
289
  {
288
290
  // If the core is forked, then forward the bootstrap event to all workers
@@ -508,13 +510,13 @@ export default class Core
508
510
 
509
511
  if(0 === code)
510
512
  {
511
- Core.log.info`${label} ⇣ terminated`
513
+ Core.log.warn`${label} ⇣ terminated`
512
514
  }
513
515
  else if('SIGTERM' === signal
514
516
  || 'SIGINT' === signal
515
517
  || 'SIGQUIT' === signal)
516
518
  {
517
- Core.log.info`${label} ⇣ terminated ⇠ ${signal_code}`
519
+ Core.log.warn`${label} ⇣ terminated ⇠ ${signal_code}`
518
520
  }
519
521
  else if(version >= this.config.find('core/cluster/restart/limit', 99))
520
522
  {
@@ -533,7 +535,7 @@ export default class Core
533
535
  {
534
536
  try
535
537
  {
536
- Core.log.info`restarting ${label} ⇡ previous process crashed ⇠ ${signal_code}`
538
+ Core.log.warn`restarting ${label} ⇡ previous process crashed ⇠ ${signal_code}`
537
539
  await this.cluster(1, branch, version + 1)
538
540
  }
539
541
  catch(reason)
@@ -620,6 +622,7 @@ export default class Core
620
622
  const { filepath, config } = await this.config.resolve(dependencyPath)
621
623
  await this.#addConfigDependencies(filepath, config)
622
624
  this.config.add(filepath, config)
625
+ Core.log.info`assigned config ${dependencyPath}`
623
626
  }
624
627
  }
625
628
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/core",
3
- "version": "4.0.11",
3
+ "version": "4.0.13",
4
4
  "description": "Core functionalities for the superhero framework.",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
@@ -9,8 +9,8 @@
9
9
  ".": "./index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@superhero/locator": "^4.3.0",
13
- "@superhero/bootstrap": "^4.1.5"
12
+ "@superhero/locator": "^4.3.8",
13
+ "@superhero/bootstrap": "^4.1.6"
14
14
  },
15
15
  "scripts": {
16
16
  "test": "node --trace-warnings --test --experimental-test-coverage"
@@ -21,6 +21,6 @@
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "https://github.com/superhero/core"
24
+ "url": "git+https://github.com/superhero/core.git"
25
25
  }
26
26
  }