OpenHAB2 console command
Logging in openHAB
This article describes the logging functionality in openHAB 2. This includes how to access logging information and configure logging for user-defined rules.
There are two ways to check log entries:
- Through files stored on the file system
- During runtime in the Karaf Console
File System
Log files are written to either userdata/log (manual setup) or /var/log/openhab2 (apt/deb-based setup) and can be accessed using standard OS tools for text files. The default installation of openHAB generates two log files:
events.logopenhab.log
Karaf Console
The Karaf console allows to monitor the log in real-time.
The log shell comes with the following commands:
| Log Command | Description |
|---|---|
log:clear |
Clear log entries |
log:display |
Display the last log entries |
log:exception-display |
Displays the last occurred exception from the log |
log:get |
Show the currently set log level |
log:list |
List the currently set loggers with their levels |
log:log |
Log a message |
log:set |
Set the log level |
log:tail |
Continuously display log entries. Use ctrl-c to quit this command |
No Comments