diff --git a/README.md b/README.md index 52a45ce8..55db8a15 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ This library is included by default in the openHAB [JavaScript Scripting add-on] - [Cache](#cache) - [Time](#time) - [Quantity](#quantity) - - [Log](#log) - [Utils](#utils) - [Environment](#environment) - [Rules created from Script Files](#rules-created-from-script-files) @@ -282,12 +281,12 @@ The JS Scripting binding supports the standard `console` object for logging. Script logging is enabled by default at the `INFO` level (messages from `console.debug` and `console.trace` won't be displayed), but can be configured using the [openHAB console](https://www.openhab.org/docs/administration/console.html): ```text -log:set DEBUG org.openhab.automation.script -log:set TRACE org.openhab.automation.script -log:set DEFAULT org.openhab.automation.script +log:set DEBUG org.openhab.automation.jsscripting +log:set TRACE org.openhab.automation.jsscripting +log:set DEFAULT org.openhab.automation.jsscripting ``` -The default logger name consists of the prefix `org.openhab.automation.script` and the script’s individual part `.file.filename` or `.ui.ruleUID`. +The default logger name consists of the prefix `org.openhab.automation.jsscripting` and the script’s individual part `.file.`, `.rule.`, or `.transformation.`. This logger name can be changed by assigning a new string to the `loggerName` property of the console: ```javascript @@ -1365,18 +1364,6 @@ For the string the same rules apply as described above. See [openhab-js : Quantity](https://openhab.github.io/openhab-js/Quantity.html) for full API documentation. -### Log - -By default, the JS Scripting binding supports console logging like `console.log()` and `console.debug()` to the openHAB default log. -Additionally, scripts may create their own native openHAB logger using the log namespace. - -```javascript -var logger = log('my_logger'); - -//prints "Hello World!" -logger.debug("Hello {}!", "world"); -``` - ### Utils openHAB internally is a Java program.