Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion administration/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ title: Logging
This article describes the logging functionality in openHAB.
This includes how to access logging information and configure logging for user-defined rules.

There are two ways to check log entries:
There are three ways to check log entries:

1. Through the **Main UI log viewer**
1. Through files stored on the **file system**
1. During runtime in the **Karaf Console**

## Main UI Log Viewer

Administrator users can view the logs directly in Main UI through [Developer Tools - Log Viewer]({{base}}/mainui/developer/log-viewer.html).
Besides opening it from **Developer Tools**, the log viewer can be toggled from any page as a persistent bottom pane.
Click the `square_list` icon in the upper right corner or press <kbd>Shift</kbd><kbd>Alt</kbd><kbd>L</kbd>.
The pane remains visible while you navigate between Main UI pages, and <kbd>Shift</kbd><kbd>Alt</kbd><kbd>F</kbd> maximizes or restores it.

The Main UI log viewer supports filtering, highlighting, downloading, and copying log messages.

## Filesystem

Log files are written to either `userdata/log` (manual setup) or `/var/log/openhab` (package based setup) and can be accessed using standard OS tools for text files. The default installation of openHAB generates two log files:
Expand Down
5 changes: 4 additions & 1 deletion mainui/developer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ The developer tools page is split into two tabs:

- **Developer Sidebar**<br>
The [developer sidebar]({{base}}/mainui/developer/sidebar) is accessible from anywhere in the UI and provides both an integrated help and developer tools, like the universal search or the widget expression tester.
The integrated help even actually renders selected parts of the [Main UI documentation]({{base}}/mainui).
Open it from this page, with the help icon in the upper right corner, or with <kbd>Alt</kbd><kbd>Shift</kbd><kbd>D</kbd>.
The integrated help also renders selected parts of the [Main UI documentation]({{base}}/mainui).
So if you read this from the website, you can also read this from inside the UI.
- **API Explorer**<br>
Interactively discover and access the [REST API]({{base}}/configuration/restdocs), which is also used by Main UI to interact with the openHAB server.
- [**Log Viewer**](log-viewer)<br>
View the logs of the openHAB server in a convenient way. Filter, highlight, download and copy log messages.
It can also be toggled from any page as a persistent bottom pane with the `square_list` icon in the upper right corner or with <kbd>Shift</kbd><kbd>Alt</kbd><kbd>L</kbd>.
When visible, press <kbd>Shift</kbd><kbd>Alt</kbd><kbd>F</kbd> to maximize or restore it.
<!-- END MAINUI SIDEBAR DOC - DO NOT REMOVE -->
5 changes: 5 additions & 0 deletions mainui/developer/log-viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ title: Developer Tools - Log Viewer
Main UI provides an integrated log viewer that allows to view the logs of the openHAB server.
It provides filtering and highlighting capabilities, as well as download and copy options.

You can open the log viewer from **Developer Tools** or toggle it as a persistent bottom pane from any Main UI page.
Click the `square_list` icon in the upper right corner, next to the developer sidebar icon, or press <kbd>Shift</kbd><kbd>Alt</kbd><kbd>L</kbd>.
The pane remains visible while you navigate between pages.
When it is open, press <kbd>Shift</kbd><kbd>Alt</kbd><kbd>F</kbd> to maximize or restore it.

As the log viewer is using WebSockets to receive log messages, some restrictions apply:

- Fancy firewall rules or proxies may block the WebSocket connection.
Expand Down
2 changes: 1 addition & 1 deletion mainui/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Users with the administrator role can use the left panel menu to access:
- [**Add-on Store**](addons)<br>
openHAB can and has to be extended via add-ons. Add-ons include bindings, automation, persistence and much more. Visit the store to discover all available add-ons.
- [**Developer Tools**](developer)<br>
Special functions including creation of custom widgets and block libraries as well as the developer sidebar.
Special functions including creation of custom widgets and block libraries as well as the developer sidebar and integrated log viewer.
- [**Help & About**](about)<br>
The about page shows general information of your openHAB configuration and allows to configure some client related configuration.

Expand Down
5 changes: 5 additions & 0 deletions tutorials/getting_started/tips-and-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ This fourth tab has quick links to create any sort of Object that can be created

Sometimes you may face errors, even if you tried your best with developing a working solution.
In cases where the failure can not be found in a fast way you can have a look at the logging output that openHAB provides.
The `square_list` icon right next to the developer sidebar icon toggles the integrated log viewer pane from any page, or you can press <kbd>Shift</kbd><kbd>Alt</kbd><kbd>L</kbd>.
When the log viewer pane is open, <kbd>Shift</kbd><kbd>Alt</kbd><kbd>F</kbd> maximizes or restores it.

In MainUI, the integrated log viewer can be opened from **Developer Tools -> Log Viewer** or toggled from any page as a bottom pane with <kbd>Shift</kbd><kbd>Alt</kbd><kbd>L</kbd>.
It stays visible while you move between pages, and <kbd>Shift</kbd><kbd>Alt</kbd><kbd>F</kbd> maximizes or restores it.

Accessing the logs depends on different factors (e.g. the way you have installed openHAB).
You can find an overview of how to access and handle logging in the [corresponding article](/docs/administration/logging.html).
Expand Down