openHAB 2 logging, not working for some bindings

I am using the following for astro:

# astro logger
log4j.logger.org.openhab.binding.astro = TRACE, astro, osgi:*
log4j.additivity.org.openhab.binding.astro = false
log4j.appender.astro=org.apache.log4j.RollingFileAppender
log4j.appender.astro.layout=org.apache.log4j.PatternLayout
log4j.appender.astro.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-26.26c{1}] - %m%n
log4j.appender.astro.file=${openhab.logdir}/astro.log
log4j.appender.astro.append=true
log4j.appender.astro.maxFileSize=100MB
log4j.appender.astro.maxBackupIndex=10

And for lifx:

# lifx logger
log4j.logger.org.openhab.binding.lifx = TRACE, lifx, osgi:*
log4j.additivity.org.openhab.binding.lifx = false
log4j.appender.lifx=org.apache.log4j.RollingFileAppender
log4j.appender.lifx.layout=org.apache.log4j.PatternLayout
log4j.appender.lifx.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-26.26c{1}] - %m%n
log4j.appender.lifx.file=${openhab.logdir}/lifx.log
log4j.appender.lifx.append=true
log4j.appender.lifx.maxFileSize=100MB

The problem is that both files are 0 in size, I am logging a lot of other things to files, without issues. Any ideas?

openhab> log:list
Logger                                                      | Level
-------------------------------------------------------------------
ROOT                                                        | WARN
com.beowulfe.hap                                            | TRACE
javax.jmdns                                                 | ERROR
org.apache.karaf.kar.internal.KarServiceImpl                | ERROR
org.eclipse.smarthome                                       | INFO
org.jupnp                                                   | ERROR
org.openhab                                                 | INFO
org.openhab.binding.astro                                   | TRACE
org.openhab.binding.autelis                                 | TRACE
org.openhab.binding.http                                    | INFO
org.openhab.binding.insteonplm                              | INFO
org.openhab.binding.lifx                                    | TRACE
org.openhab.binding.minecraft                               | DEBUG
org.openhab.binding.mios                                    | DEBUG
org.openhab.binding.modbus                                  | INFO
org.openhab.binding.neato                                   | INFO
org.openhab.binding.nest                                    | DEBUG
org.openhab.binding.serial                                  | DEBUG
org.openhab.binding.weather                                 | TRACE
org.openhab.binding.zwave                                   | TRACE
org.openhab.io.homekit                                      | TRACE
org.openhab.io.hueemulation                                 | TRACE
org.openhab.persistence.db4o                                | DEBUG
org.openhab.persistence.mapdb                               | DEBUG
org.openhab.persistence.mysql                               | DEBUG
org.openhab.persistence.rrd4j                               | DEBUG
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper | ERROR
smarthome.event                                             | INFO
smarthome.event.InboxUpdatedEvent                           | ERROR
smarthome.event.ItemStateEvent                              | ERROR
smarthome.event.ThingStatusInfoEvent                        | ERROR

Anyone have any ideas?

  • The LIFX binding has always been part of ESH so you should use:
    org.eclipse.smarthome.binding.lifx

  • In recent 2.1.0-SNAPSHOT builds the Astro binding was moved to ESH so then you should use:
    org.eclipse.smarthome.binding.astro

2 Likes

This is completely new for me… (maybe I missed an announcement? :stuck_out_tongue:)

What is the best way to identify this info? (that a binding has been moved to ESH and/or it’s proper mvn name).
For example, in Karaf console I had to issue several commands to find this info…

openhab> feature:list |grep -i astro
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Started     | addons-2.1.0-SNAPSHOT   |
openhab-binding-astro                       | 2.1.0.SNAPSHOT   | x        | Started     | addons-2.1.0-SNAPSHOT   | Astro Binding

openhab> bundle:list |grep -i astro
190 | Active   |  80 | 0.9.0.201705120951     | Astro Binding

openhab> feature:info openhab-binding-astro
Feature openhab-binding-astro 2.1.0.SNAPSHOT
Description:
  Astro Binding
Feature has no configuration
Feature has no configuration files
Feature depends on:
  esh-binding-astro 0.0.0
Feature has no bundles.
Feature has no conditionals.

openhab> feature:info esh-binding-astro
Feature esh-binding-astro 0.9.0.SNAPSHOT
Feature has no configuration
Feature has no configuration files
Feature depends on:
  esh-base 0.0.0
Feature contains followed bundles:
  mvn:org.eclipse.smarthome.binding/org.eclipse.smarthome.binding.astro/0.9.0-SNAPSHOT
Feature has no conditionals.

openhab> service:list |grep -i astro
 Astro Binding (190)
 component.name = org.eclipse.smarthome.binding.astro.discovery

Except for ESH #3213 there was not really an announcement.

The symbolic name of a bundle should match the package names on which you can enable logging:

openhab> bundle:list -s|grep astro
187 | Active   |  80 | 0.9.0.201705120951     | Astro Binding                                          | org.eclipse.smarthome.binding.astro

---scroll---to---the--right--->
1 Like