Skip to content

Commit

Permalink
Merge pull request #166 from gonX/wiki-update-to-logs-folder
Browse files Browse the repository at this point in the history
FAQ: Update to OTD's new logging method
  • Loading branch information
X9VoiD authored Mar 17, 2024
2 parents 791bce9 + 3143c0f commit 785e57c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 15 additions & 11 deletions site/_wiki/Documentation/Logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,35 @@ title: Logs

## GUI

To view logs, click on the <kbd>Console</kbd> tab. Optionally, change filter from <kbd>Information</kbd> to <kbd>Debug</kbd> for more detailed logs.
To view the current logs, click on the <kbd>Console</kbd> tab. Optionally, change filter from <kbd>Information</kbd> to <kbd>Debug</kbd> for more detailed logs.

To export logs, click <kbd>Help</kbd> ⇒ <kbd>Export diagnostics</kbd> in the top menu bar.
You can also find previous logs in the `Logs/` folder of the application data location.
See more in the [Daemon log](#daemon-log) section.

Sometimes, the OpenTabletDriver daemon can crash hard enough that the errors can't be
sent to the GUI. In this case, you can find a
partial log in the location specified [here](#daemon-log).
To export logs, click <kbd>Help</kbd> ⇒ <kbd>Export diagnostics</kbd> in the top menu bar.

## Daemon

The output from daemon is the log.
The output from daemon is logged to the `Logs/` folder.

On Linux when running daemon via systemd service, the log for the daemon is recorded by systemd.
On Linux when running daemon via systemd service, the log for the daemon is also recorded by systemd.
To view that log, run the following command as your user:

```bash
journalctl --user-unit opentabletdriver.service
```

### Exception Log Location {#daemon-log}
### Daemon Log Location {#daemon-log}

If the daemon crashes from an "unrecoverable" exception, the error is appended to the log file.
It contains a stack trace defining where the error happened, which is useful for debugging.

Up to 20 log files will be stored in the `Logs/` folder, using the date of when the daemon started as a file name.

If the daemon crashes from an "unrecoverable" exception, the `daemon.log` file will
include a stack trace defining where the error happened, which is useful for debugging.
The log files are formatted in an almost-JSON format. It is likely they are missing the array end (`]`) which
some JSON parsers do not like. However, the format remains mostly human-readable.

The `daemon.log` file is in the application data folder, located here:
The `Logs/` folder is in the application data folder, located here:

{% include appdata-location.md %}

Expand Down
2 changes: 1 addition & 1 deletion site/_wiki/FAQ/General.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The application data directory contents are as follows:
| :---------------: | :----: | :---------- |
| `settings.json` | File | Stores the driver settings
| `tablet-data.txt` | File | Stores the recorded tablet data from Tablet Debugger
| `daemon.log` | File | Contains a stack trace if the daemon has crashed
| Logs | Folder | Contains up to 20 daemon logs in near-JSON format ([more info]({% link _wiki/Documentation/Logs.md %}#daemon-log))
| Backup | Folder | Contains old versions of OpenTabletDriver and its settings
| Cache | Folder | Contains cached metadata for the Plugin Manager
| Plugins | Folder | Contains installed plugins (`.dll` files). This folder should not be modified manually.
Expand Down

0 comments on commit 785e57c

Please sign in to comment.