@kronos-integration/service-systemd 4.0.1 → 4.2.0

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.
package/README.md CHANGED
@@ -29,14 +29,16 @@ kronos systemd integration
29
29
  * [Properties](#properties)
30
30
  * [credentialsDirectory](#credentialsdirectory)
31
31
  * [SystemdConfig](#systemdconfig)
32
+ * [Parameters](#parameters)
32
33
  * [Properties](#properties-1)
33
34
  * [listeningFileDescriptors](#listeningfiledescriptors)
34
35
  * [loadConfig](#loadconfig)
35
36
  * [ServiceSystemd](#servicesystemd)
37
+ * [Parameters](#parameters)
36
38
  * [getCredential](#getcredential)
37
- * [Parameters](#parameters)
38
- * [getCredentials](#getcredentials)
39
39
  * [Parameters](#parameters-1)
40
+ * [getCredentials](#getcredentials)
41
+ * [Parameters](#parameters-2)
40
42
  * [endpoints](#endpoints)
41
43
 
42
44
  ## JournalLogger
@@ -65,6 +67,11 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
65
67
  Provides config from CONFIGURATION\_DIRECTORY.
66
68
  Also injects listeningFileDescriptors into the config
67
69
 
70
+ ### Parameters
71
+
72
+ * `config`  
73
+ * `ic`  
74
+
68
75
  ### Properties
69
76
 
70
77
  * `configurationDirectory` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** taken from CONFIGURATION\_DIRECTORY
@@ -92,6 +99,11 @@ Kronos bridge to systemd:
92
99
  * start / stop / restart / reload initiated from systemd
93
100
  * log into journal
94
101
 
102
+ ### Parameters
103
+
104
+ * `config`  
105
+ * `ic`  
106
+
95
107
  ### getCredential
96
108
 
97
109
  Deliver credential as provided by systemd.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/service-systemd",
3
- "version": "4.0.1",
3
+ "version": "4.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": false
@@ -32,7 +32,7 @@
32
32
  "build": "cmake-js compile"
33
33
  },
34
34
  "dependencies": {
35
- "@kronos-integration/service": "^14.0.7",
35
+ "@kronos-integration/service": "^15.0.1",
36
36
  "config-expander": "^14.0.9"
37
37
  },
38
38
  "devDependencies": {
package/src/service.mjs CHANGED
@@ -154,6 +154,22 @@ export class ServiceSystemd extends ServiceProviderMixin(
154
154
  return "Bridge to systemd";
155
155
  }
156
156
 
157
+ constructor(config={}, ic) {
158
+ if (process.env.LOGLEVEL) {
159
+ config.logLevel = process.env.LOGLEVEL;
160
+ } else if (process.env.DEBUG) {
161
+ config.logLevel = "debug";
162
+ }
163
+ super(config, ic);
164
+ }
165
+
166
+ async registerService(service) {
167
+ if(process.env.DEBUG) {
168
+ service.logLevel = this.logLevel;
169
+ }
170
+ return super.registerService(service);
171
+ }
172
+
157
173
  get autostart() {
158
174
  return true;
159
175
  }