Having problems trying to enable logging

  • Platform information:
    • Hardware: Intel i5, 8 GB ram, 250 GB SSD. (Testing on a Microsoft Surface Pro 4)
    • OS: Windows 10 Pro 64-bit (Version 2004)
    • Java Runtime Environment: ZULU Java 8
    • openHAB: Version 2.5.6
    • Jython: Version 2.7.0

File Structure:

  • Issue of the topic:
    I need to get the debug logging on so I can see if anything is working as far as Jython rules go. I have not yet figured out exactly where and how to enable the proper logging so details will show up in “openhab.log” or some other log file. I am hopping to execute the “Hello World” Jython sample rule to start off with.

This is my first post, probably did everything wrong as far as structure goes. I have spent part of several days reading various posts on the NGRE and related stuff and was somewhat hesitant to post on this topic since it seems to have been the source of some rather heated discussions in the past and I certainly don’t want to start off by stirring something up.

I was thinking I might try to start off with Jython for rules since it seems to have the most interest currently as near as I can tell from what I have read.

The OpenHAB startup seems to be ok and I can successfully do simple things in it.

PS C:\openHAB2> c:\openHAB2\start.bat

C:\openHAB2>REM Add to the top of the file

C:\openHAB2>set EXTRA_JAVA_OPTS=-Xbootclasspath/a:C:\openhab2\automation\jython\jython-standalone-2.7.0.jar -Dpython.home=C:\openhab2\automation\jython -Dpython.path=C:\openhab2\automation\lib\python
Launching the openHAB runtime…

                      __  _____    ____      

____ ____ ___ ____ / / / / | / __ )
/ __ / __ / _ / __ / // / /| | / __ |
/ /
/ / // / __/ / / / __ / ___ |/ // /
_/ ./_// /// /// |/___/
/_/ 2.5.6
Release Build

Hit ‘’ for a list of available commands
and ‘[cmd] --help’ for help on a specific command.
Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown openHAB.


This looks like some impressive stuff, I hope I can get through this hurdle and perhaps try to do something productive. Thanks!

In recipe step 2 has a link to karaf console logging description
Access to karaf console is linked
on the logging page.
So you need to e.g. download putty to be able to ssh into karaf console from windows.

The easiest way to setup Jython and the helper libraries is to clear out everything you have done so far use the beta add-on…

Keep in mind that there is a bug in OH when run on Windws that causes rules to not start automatically. The fix will be in OH 3.0, but I made a jar for 2.5.x…

Thanks for the reply and information. It is much appreciated.

I saw your add-on w/ helper libraries post in some of my earlier reading and it sounded really good but between it and the other posts on the subject I could not seem to get it straight in my head how things should be set up for a Windows installation. Unfortunately I am unfamiliar with the other languages and operating systems which further adds to my confusion. If my OpenHAB2 installation is in “C:\OpenHAB2” then I assume your addon would go in “C:\OpenHAB2\addons” ?

I’m sure this is just wishful thinking but it seems like an MSI file for a Windows installation would really simplify things. I have not seen anything like that around so I assume it does not exist.

At any rate it looks like I have more reading to do in order to try to get this sorted out. I am hoping I can learn some Jython or whichever language seems the more logical choice for the rules if I am ever successful with the install.

Thanks again!

This information looks helpful

I will give it a try.



After they are merged, the add-ons will be available in the UI. At this rate though, that may not be until OH 3.0.

Don’t hesitate to ask questions… the installation is the easy part!

I wanted to thank everyone for the information and kind words while I was trying to get openHAB2 and some related stuff installed on Windows 10.

Got the logging going a couple of days ago, mostly reviewing “openhab.log”. Still have a lot to learn but at least now I can see some of what is going on.

Also finally got the install working and the “HelloWorld.py” test script executing properly. Based on what I read it seems like using Jython for scripting might be a decent way to go. I realize that doesn’t sound like much progress but considering the difficulty I had getting everything installed it feels like an accomplishment.

I have made a backup copy of my working installation, but at some point in the near future I want to do a fresh install to see if I can reproduce another working copy. Also I want to try to have the file structure correct, seems like some differences depending on where and what you read. Also hope to have a backup that I could use to recover everything quickly in the event something bad happens.

I would like to make choices that will make sense moving forward, thinking about openHAB3. I hope to ask for some advice in that area but I will try to put that in another post.

Thanks again!

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.