Could you guys tell me how to permanent disable the logging of the http-binding in openHab-2.2.0-Snapshot?
In the Karaf-Console i can disable with “log:set ERROR org.openhab.io.net.http.HttpUtil” but I already tried in the “/opt/openhab2/userdata/etc/org.ops4j.pax.logging.cfg” putting a line with “log4j.logger.org.openhab.io.net.http.HttpUtil = ERROR” but this doesnt work. Could you please tell me a way how to do this in the config-files?
I want to disable it as I get many errors if a address is not reachable but should be included in the sitemap anyway.
It doesn´t work as expected. I´m still getting the Log-Entries of the HTTP-Binding in my openhab.log-file. Even after redirecting it with your syntax to /dev/null/http.log (nirvana).
I just realized that you should not be modifying the log levels for the http binding (org.openhab.binding.http) but rather for the I/O network http bundle (org.openhab.io.net.http)…
this will shut up the log entries (even if they are errors)
I think that the log levels are: <TRACE, DEBUG, INFO, WARN, ERROR, FATAL> (from the most to less verbose). DEFAULT usually is INFO (this is defined per bundle)
The docs entry doesn’t have the FATAL one but has OFF: http://docs.openhab.org/administration/logging.html#defining-what-to-log
Maybe you can try OFF also.
Anyway, you should try to fix the root cause of the 409
I cannot fix it as i wanna see the status of my 3d-printer in openhab via Json-transformation. But if its offline, I get those 409.
I´ve got no idea how to check only for the status if its turned on exepct someone writes a binding for it
one (crazy) way would be: write a rule that creates (copies over from another dir to the items dir) an *.items file with your http bound 3dprinter when the switch is on
remove the file (or overwrite it with an empty one) when switch goes off (again with a rule that calls upon an exec bound item that essentially runs a script). In theory, the http bound 3dprinter item should go away from OH2. If not, you could issue a OH2 console command from the script to remove the item.
with exec binding you could issue any command to the host (or send REST calls to do the same: add/remove item)
this is a kinda of stupid method and I am sure that there are better ways that other people will recommend
I am simply on my first cup of coffee
Thank you. I don´t got such a solution in mind. That´s no bad idea. I can create a bash-script which switches between 2 files. One with the items and their http-channels and json-transform and the other with only the items (so i don´t receive errors about missing items if i visit the sitemap).