Skip to content

Commit 74e9e45

Browse files
committed
Added system.host.${string} to allower namespaces
1 parent 2cf8bb9 commit 74e9e45

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ A full example is the Sentry plugin: https://github.com/ioBroker/plugin-sentry o
146146
Placeholder for the next version (at the beginning of the line):
147147
### **WORK IN PROGRESS**
148148
-->
149-
### 3.0.2 (2025-10-16)
149+
### **WORK IN PROGRESS**
150150
- (@GermanBluefox) Added `system.host.${string}` to allower namespaces
151151

152152
### 3.0.1 (2025-10-08)

src/lib/NamespaceLogger.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22
* Logger with Namespace-prefix for ioBroker
33
*/
44
export default class NamespaceLogger {
5-
readonly #namespaceLog: `${`system.adapter.${string}.${number}` | `system.host.${string}`} Plugin ${string}`;
5+
readonly #namespaceLog: string;
66
#logger: ioBroker.Logger;
77

88
/**
99
* @param namespaceLog Logging-Namespace as prefix
1010
* @param logger Logger-instance
1111
*/
12-
constructor(
13-
namespaceLog: `${`system.adapter.${string}.${number}` | `system.host.${string}`} Plugin ${string}`,
14-
logger: ioBroker.Logger,
15-
) {
12+
constructor(namespaceLog: string, logger: ioBroker.Logger) {
1613
this.#namespaceLog = namespaceLog;
1714
// We need to bind this context, otherwise this can be undefined
1815
// when logger methods are passed around.

src/types.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface PluginHandlerSettings {
3333
/** The object namespace for the plugin, e.g. `system.adapter.<adaptername>.0.plugins.name`, or `system.host.<hostname>.plugins.name` */
3434
namespace: `system.adapter.${string}.${number}` | `system.host.${string}`;
3535
/** The namespace which will be used for logging */
36-
logNamespace: `${`system.adapter.${string}.${number}` | `system.host.${string}`} Plugin ${string}`;
36+
logNamespace: string;
3737
/** The logger object to use for logging */
3838
log: ioBroker.Logger;
3939
/** The complete ioBroker configuration object */
@@ -52,7 +52,7 @@ export interface PluginSettings {
5252
/** The object namespace for the plugin, e.g. `system.adapter.<adaptername>.0.plugins.name`, or `system.host.<hostname>.plugins.name` */
5353
pluginNamespace: `system.adapter.${string}.${number}.plugins.${string}` | `system.host.${string}.plugins.${string}`;
5454
/** The namespace which will be used for logging */
55-
pluginLogNamespace: `${`system.adapter.${string}.${number}` | `system.host.${string}`} Plugin ${string}`;
55+
pluginLogNamespace: string;
5656
/** The logger object to use for logging */
5757
log: ioBroker.Logger;
5858
/** The complete ioBroker configuration object */

0 commit comments

Comments
 (0)