Skip to content

Commit

Permalink
customisable streamlink log level
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBrax committed Jan 18, 2024
1 parent eb924c7 commit 5c8e3fd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions common/ServerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,23 @@ export const settingsFields: Record<string, SettingField> = {
help: "If set to -1, it will be ignored. 0 disables the check.",
},

"capture.loglevel": {
group: "Capture",
text: "Capture log level",
type: "object",
default: "info",
choices: {
none: "None",
critical: "Critical",
error: "Error",
warning: "Warning",
info: "Info",
debug: "Debug",
trace: "Trace",
all: "All",
},
},

"capture.use_cache": {
group: "Capture",
text: "Use cache",
Expand Down
4 changes: 3 additions & 1 deletion server/src/Core/Providers/Base/BaseAutomator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,9 @@ export class BaseAutomator {
cmd.push("--retry-max", "5");

// logging level
if (Config.debug) {
if (Config.getInstance().cfg("capture.loglevel", "info") !== "info") {
cmd.push("--loglevel", Config.getInstance().cfg("capture.loglevel", "info"));
} else if (Config.debug) {
cmd.push("--loglevel", "debug");
} else if (Config.getInstance().cfg("app_verbose", false)) {
cmd.push("--loglevel", "info");
Expand Down

0 comments on commit 5c8e3fd

Please sign in to comment.