DEBUG mode does not get active

As far as everybodys first reply to my post is “Have you seen something in debug log?”
I want to clarify why this might not work on my PI :frowning:

I read the dokumentation for my binding and did
“openhab-cli console”

log:set DEBUG org.openhab.binding.zwave

log:get I see the DEBUG for that entry.

but whatever i do no see is any kind of “[DEBUG] …xyz” inside log:tail :frowning:

What is wrong there?
Then I tried to trigger a log(DEBUG) with script, BUT

log:set DEBUG org.openhab.core.model.script

(as mentioned here Logging | openHAB)
throws an error :frowning:

Any helpfull hint?

EDIT: When I set

log:set DEBUG ROOT

I see everything I want.

You need to open the KARAF console in order to set log:levels!


ssh -p 8101 openhab@localhost

to get to the karaf console (default password is habopen)

are you kidding? that is the same:


Never used that command and always called it karaf-console.
Sorry for that!
Back to your problem:

If you did raise and check the log level to DEBUG and do not see such lines, probably no such lines did probably appear in the timeframe you checked. ( is this binding installed, do you have devices using this protocol in your system?)

Could you show the error you got?

Yes,there more than 10 (for now only powersupplied devices)
and I can a see no entries (at least for 3 days) inside
(or tail -f /var/log/openhab/openhab.log if you prefer it with ssh instead of http)

For this case I wanted to setup loglevel for script (because I can trigger that myself for sure) s.o.

That would be using frontail, that way you should monitor events.log and openhab.log ( and not openhab.log only, as posted in your tail command).

I’m not used to logging i scripts, I do it in rules. For DSL rules it is working as documented in Here.
An example for javascript rules:

var logger = Java.type('org.slf4j.LoggerFactory').getLogger('org.openhab.rule.' + ctx.ruleUID); ("MyItem State: {}", MyItem );

Will produce an entry in the openhab.log with
…[info] (org.openhab.rule.YourRuleUID) - MyItem State: …

For sure I get [info] [warning] [error] too from script. But not [DEBUG] after all.
(I remembered some issues that were solved after shutdown; but even this did not help here)

A little bit radical but with

log:set DEBUG ROOT

I can see “something” (too much)

Another :roll_eyes:

Never used the logger with debug, it doesn’t create lines although .info does.

Learnt something new here. I didn’t know that was an equivalent to the ssh login :slight_smile:

I tried

as well as

and it worked in both cases. Observation of the logfile was done with

So I did everything as posted by yourself. What I see is a difference in the OH version: you have 3.2.0 whereas I have a 3.2.0M4 installed.

Can you post me your result of “log:get”
Just want to see, if that log4js is static or dynamicly growing if putting any line that is not there.
(as far as I know they are merge directives of some *.config files)

So do you had ANY line with this before or was it added?

As far as I now the lines you added can be removed by setting the level DEFAULT for that packet.


Logging in as openhab

     _   ___   ___   ___  | | | |   / \   | __ ) 
  / _ \ / _ \ / _ \ / _ \ | |_| |  / _ \  |  _ \ 
 | (_) | (_) |  __/| | | ||  _  | / ___ \ | |_) )
  \___/|  __/ \___/|_| |_||_| |_|/_/   \_\|____/ 
       |_|       3.2.0.M4 - Milestone Build

Use '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
To exit, use '<ctrl-d>' or 'logout'.

openhab> log:get                                                                                                                                                                                                                     
Logger                                             │ Level
ROOT                                               │ WARN
javax.jmdns                                        │ ERROR
javax.mail                                         │ ERROR
openhab.event                                      │ INFO
openhab.event.AddonEvent                           │ ERROR
openhab.event.ChannelDescriptionChangedEvent       │ ERROR
openhab.event.InboxUpdatedEvent                    │ ERROR
openhab.event.ItemAddedEvent                       │ ERROR
openhab.event.ItemChannelLinkAddedEvent            │ ERROR
openhab.event.ItemChannelLinkRemovedEvent          │ ERROR
openhab.event.ItemRemovedEvent                     │ ERROR
openhab.event.ItemStateEvent                       │ ERROR
openhab.event.RuleAddedEvent                       │ ERROR
openhab.event.RuleRemovedEvent                     │ ERROR
openhab.event.RuleStatusInfoEvent                  │ ERROR
openhab.event.StartlevelEvent                      │ ERROR
openhab.event.ThingAddedEvent                      │ ERROR
openhab.event.ThingRemovedEvent                    │ ERROR
openhab.event.ThingStatusInfoEvent                 │ ERROR
openhab.event.ThingUpdatedEvent                    │ ERROR
org.apache.cxf.jaxrs.sse.SseEventSinkImpl          │ ERROR
org.apache.karaf.jaas.modules.audit                │ INFO
org.apache.karaf.kar.internal.KarServiceImpl       │ ERROR                │ ERROR                     │ OFF
org.apache.sshd                                    │ WARN
org.eclipse.lsp4j                                  │ OFF
org.jupnp                                          │ ERROR
org.openhab                                        │ INFO
org.openhab.automation.script                      │ TRACE
org.openhab.binding.zwave                          │ INFO
org.openhab.core.model.script                      │ INFO
org.ops4j.pax.url.mvn.internal.AetherBasedResolver │ ERROR
org.ops4j.pax.web.pax-web-runtime                  │ OFF
su.litvak.chromecast.api.v2.Channel                │ ERROR

This is the state after a reboot. Don’t know wether that contains cached information as I have nothing to compare it against from before I executed your commands yesterday.