Logs not working

Hi all,

After upgrade to OH2.2 1017 build, my logging no longer works. Console shows Error in most spots as below. Is there a way to reset this to get it working? Thanks

Logger                                                      │ Level
────────────────────────────────────────────────────────────┼──────
ROOT                                                        │ WARN
javax.jmdns                                                 │ ERROR
org.apache.aries.spifly                                     │ ERROR
org.apache.karaf.kar.internal.KarServiceImpl                │ ERROR
org.eclipse.smarthome                                       │ INFO
org.jupnp                                                   │ ERROR
org.openhab                                                 │ INFO
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper │ ERROR
smarthome.event                                             │ INFO
smarthome.event.InboxUpdatedEvent                           │ ERROR
smarthome.event.ItemAddedEvent                              │ ERROR
smarthome.event.ItemRemovedEvent                            │ ERROR
smarthome.event.ItemStateEvent                              │ ERROR
smarthome.event.ThingStatusInfoEvent                        │ ERROR

You are showing the result of “log:list”, which displays the used log settings of your system. Each packet with the setting “Error” will log only the errors, in case of “Info” also Infos will be logged. In order to see the actual log entries use “log:tail”.

1 Like

Thank you for the reply. Ok, so my events.log and openhab.log files were showing everything up til 12:25pm today, that is the last time stamp on the files. Now they do not have any updates, errors or not. I was not really trying to see it in real time, but wanted to reference those log files when doing trouble shooting as i set up my system.

So I probably started off here in the wrong direction using the karaf console. Would there be any reason that my log files no longer update?

Thanks

Hi @Sabre66, I’m guessing you used apt-get to upgrade? When did you last upgrade? If it was less than 4 days ago, then you may have missed a warning (and suggestion) on the upgrade:

Is there a file located at /var/lib/openhab2/org.ops4j.pax.logging.cfg.dpkg-dist ? This should be /var/lib/openhab2/org.ops4j.pax.logging.cfg

Thank you Ben,

Yes, I am on 1017 from today. No, I did not see that notice, and I do not have that file in the location that you indicate. Do you know if there is a way to re-enable logging given the changes?

Edit, I do however see those files under /var/lib/openhab2/etc/

Ah yes, sorry. I missed a path.

/var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.dpkg-dist should be /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

The current org.ops4j.pax.logging.cfg contains your original configuration, but is no longer valid since that upgrade.

When you upgraded, apt would have asked what you wanted to do with the original file, by default it keeps your original file as standard.

1 Like

Ok, i believe i said no when asked. So do you think there is any way to get the logging to resume, for all actions?

Well to revert back to defaults all you’d need to to is

sudo mv /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.old
sudo mv /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.dpkg-dist /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

sudo systemctl restart openhab2.service

That’ll resume logging as normal, does that help?

13 Likes

Ben, thanks so much. This worked perfect!

1 Like

Today I had the same problem after upgrading to 2.2
I Switched the logfiles like described and now it is working again as expected.

Thanks for the help!

same here…

Also worked for me!

Logging has also stopped for me in openhab 2.2

Can I have the contents of the /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg.dpkg-dist

I must have modified this file because I have only org.ops4j.pax.logging.cfg.dpkg-old and renaming it did not work.

I found the config file here

Logging is working now

thanks, taht saved me

works like a charme!

1 Like

Same for me after a recent update. Thanks for that, very clear.

Martin.

I modify the org.ops4j.pax.logging.cfg before, and the apt doesn’t create the org.ops4j.pax.logging.cfg.dpkg-dist file. So i download the latest openhab package with command:

apt-get download openhab2

Extracted the file from /CONTENTS/var/lib/openhab2/etc/ and overwrite the old one with the new one found in the dep package.

After /etc/init.d/openhab2 restart the logging work again…

1 Like