feat(patch): update patch 07

This commit is contained in:
josselinonduty 2025-11-30 23:25:58 +01:00
parent 0cc89e591b
commit efbbe441bb
No known key found for this signature in database
2 changed files with 42 additions and 37 deletions

View File

@ -47,17 +47,18 @@ Other packages can be installed from you package manager, either by clicking on
| `--hide-appoffline-banner` | Hide the "Application is offline" banner that appears when using a VPN or DNS blocker (see [patch](./patches/11-hide-appoffline-banner.patch)) |
| `--disable-animations` | Disable animations (see [patch](./patches/12-disable-animations.patch)) |
| `--disable-notifications` | Disable notifications (see [patch](./patches/13-disable-notifications.patch)) |
| `--log-level` | Set the log level (`silly`,`debug`,`verbose`,`info`,`warn`,`error`) (see [patch](./patches/07-log-level-environment-variable.patch)) |
| `--enable-wayland-ime` `--ozone-platform-hint=auto` `--wayland-text-input-version=3` | Enable IME keyboard support on Wayland |
| Environment variable | Options | Description |
| --------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| --------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `DZ_START_IN_TRAY` | `yes`,`no` | Start the app in the tray (see [patch](./patches/01-start-hidden-in-tray.patch)) |
| `DZ_DISABLE_SYSTRAY` | `yes`,`no` | Quit the app when the window is closed (see [patch](./patches/03-quit.patch)) |
| `DZ_KEEP_KERNEL` | `yes`,`no` | Use the exact kernel version (see [patch](./patches/05-remove-os-information.patch)) |
| `DZ_HIDE_APPOFFLINE_BANNER` | `yes`,`no` | Hide the "Application is offline" banner (see [patch](./patches/11-hide-appoffline-banner.patch)) |
| `DZ_DISABLE_ANIMATIONS` | `yes`,`no` | Disable animations (see [patch](./patches/12-disable-animations.patch)) |
| `DZ_DISABLE_NOTIFICATIONS` | `yes`,`no` | Disable notifications (see [patch](./patches/13-disable-notifications.patch)) |
| `LOG_LEVEL` | `silly`,`debug`,`verbose`,`info`,`warning`,`error` | Set the log level (see [patch](./patches/07-log-level-environment-variable.patch)) |
| `DZ_LOG_LEVEL` | `silly`,`debug`,`verbose`,`info`,`warn`,`error` | Set the log level (see [patch](./patches/07-log-level-environment-variable.patch)) |
| `DZ_DEVTOOLS` | `yes`,`no` | Enable the developer console (ctrl+shift+i) |
## Building from source

View File

@ -1,6 +1,6 @@
From 5cc1a232e85c96163cba700321df9079ea4e4379 Mon Sep 17 00:00:00 2001
From 32888596092dd2bded632299af0782a1eb871f18 Mon Sep 17 00:00:00 2001
From: josselinonduty <contact@josselinonduty.fr>
Date: Wed, 14 May 2025 14:55:20 +0900
Date: Sun, 30 Nov 2025 22:37:18 +0100
Subject: [PATCH] fix: set default log level to "warn" to respect Deezer TOS;
control log level from environment variable
@ -9,14 +9,14 @@ This stops the excessive logging, since parts of the app will not run in develop
mode anymore. It also stops the app from logging the urls for the mp3 files, which is
against the Deezer TOS.
---
build/main.js | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
build/main.js | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/build/main.js b/build/main.js
index eabc5e1..485b953 100644
index 481fc5c..b141aa2 100644
--- a/build/main.js
+++ b/build/main.js
@@ -3305,12 +3305,14 @@
@@ -3316,12 +3316,18 @@
processType: isProcessMain() ? "main" : process.type,
}),
(external_electron_log_default().transports.console.format = `{h}:{i}:{s}.{ms} ({processType}/{level}) ${isPlatform(PLATFORM.WINDOWS) ? ">" : ""} {text}`),
@ -27,16 +27,20 @@ index eabc5e1..485b953 100644
- ? "silly"
- : "warn"),
+ (external_electron_log_default().transports.console.level =
+ isDev({ isPackaged: true }) || process.env.LOG_LEVEL
+ ? process.env.LOG_LEVEL
+ : "warn"),
+ (process.argv.find((arg) => arg.startsWith("--log-level=")) || "").split(
+ "="
+ )[1] ||
+ process.env.DZ_LOG_LEVEL ||
+ "warn"),
+ (external_electron_log_default().transports.file.level =
+ isDev({ isPackaged: true }) || !process.env.LOG_LEVEL
+ ? process.env.LOG_LEVEL
+ : "warn"),
+ (process.argv.find((arg) => arg.startsWith("--log-level=")) || "").split(
+ "="
+ )[1] ||
+ process.env.DZ_LOG_LEVEL ||
+ "warn"),
(external_electron_log_default().transports.sentry = function (msg) {
"error" === msg.level &&
(msg.data[0] instanceof Error
--
2.43.0
2.48.1