Skip to content

Commit 4446809

Browse files
authored
Merge pull request #756 from arabcoders/dev
Feat: Ability to disable or change the level of webhook logs
2 parents a8ac563 + e94dd24 commit 4446809

File tree

13 files changed

+541
-15
lines changed

13 files changed

+541
-15
lines changed

FAQ.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,3 +724,31 @@ from the trusted sources will be granted access without further authentication.
724724
> Setting both `WS_TRUST_PROXY` and `WS_TRUST_LOCAL` to true will disable all internal authentication mechanisms.
725725
> Ensure that your external auth layer is secure and properly configured to prevent unauthorized access. Your entire
726726
> WatchState instance will be open to anyone who access it via local network.
727+
728+
---
729+
730+
# Failing due to duplicate UUID
731+
732+
If you clone your media backend instance, your UUID might be duplicated as well. Unfortunately we cannot add a check
733+
against that as it would break `3-way sync`. Duplicate UUID may lead to unforeseen issues such as automatic sub users
734+
creation failing to load. To fix the issue it's recommended to change the backend UUID to do so,
735+
736+
* For jellyfin: `config/data/device.txt`
737+
* For Emby: `data/device.txt`
738+
* For Plex: `Library/Application Support/Plex Media Server/Preferences.xml` key: `ProcessedMachineIdentifier`.
739+
740+
Those values need to be unique per instance.
741+
742+
---
743+
744+
# Failing due to duplicate UUID
745+
746+
If you clone your media backend instance, your UUID might be duplicated as well. Unfortunately we cannot add a check
747+
against that as it would break `3-way sync`. Duplicate UUID may lead to unforeseen issues such as automatic sub users
748+
creation failing to load. To fix the issue it's recommended to change the backend UUID to do so,
749+
750+
* For jellyfin: `config/data/device.txt`
751+
* For Emby: `data/device.txt`
752+
* For Plex: `Library/Application Support/Plex Media Server/Preferences.xml` key: `ProcessedMachineIdentifier`.
753+
754+
Those values need to be unique per instance.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ $ docker compose up -d
8282
### Via docker command.
8383

8484
```bash
85-
$ docker run -d --rm --user "${UID:-1000}:${GID:-1000}" --name watchstate --restart unless-stopped -p 8080:8080 -v ./data:/config:rw ghcr.io/arabcoders/watchstate:latest
85+
$ docker run -d --user "${UID:-1000}:${GID:-${UID:-1000}}" --name watchstate --restart unless-stopped -p 8080:8080 -v ./data:/config:rw ghcr.io/arabcoders/watchstate:latest
8686
```
8787

8888
> [!IMPORTANT]

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"dragonmantank/cron-expression": "^3.4.0",
5353
"halaxa/json-machine": "^1.2.0",
5454
"ramsey/uuid": "^4.7.6",
55-
"perftools/php-profiler": "^1.1.2"
55+
"perftools/php-profiler": "^1.1.2",
56+
"firebase/php-jwt": "^6.11"
5657
},
5758
"suggest": {
5859
"ext-sockets": "For UDP communications."

composer.lock

Lines changed: 64 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/config.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@
144144
];
145145

146146
$config['webhook'] = [
147-
'logfile' => ag($config, 'tmpDir') . '/logs/webhook.' . $logDateFormat . '.log',
147+
'log' => [
148+
'enabled' => (bool)env('WS_WEBHOOK_LOG_ENABLED', true),
149+
'level' => env('WS_WEBHOOK_LOG_LEVEL', Level::Info),
150+
'file' => ag($config, 'tmpDir') . '/logs/webhook.' . $logDateFormat . '.log',
151+
],
148152
'dumpRequest' => (bool)env('WS_WEBHOOK_DUMP_REQUEST', false),
149153
'tokenLength' => (int)env('WS_WEBHOOK_TOKEN_LENGTH', 16),
150154
'file_format' => (string)env('WS_WEBHOOK_LOG_FILE_FORMAT', 'webhook.{backend}.{event}.{id}.json'),

0 commit comments

Comments
 (0)