feat(web,server)!: runtime log level (#5672)

* feat: change log level at runtime

* chore: open api

* chore: prefer env over runtime

* chore: remove default env value
This commit is contained in:
Jason Rasmussen 2023-12-14 11:55:40 -05:00 committed by GitHub
parent f2270ad757
commit 9768931275
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 771 additions and 117 deletions

View file

@ -45,6 +45,12 @@ export enum SystemConfigKey {
JOB_LIBRARY_CONCURRENCY = 'job.library.concurrency',
JOB_MIGRATION_CONCURRENCY = 'job.migration.concurrency',
LIBRARY_SCAN_ENABLED = 'library.scan.enabled',
LIBRARY_SCAN_CRON_EXPRESSION = 'library.scan.cronExpression',
LOGGING_ENABLED = 'logging.enabled',
LOGGING_LEVEL = 'logging.level',
MACHINE_LEARNING_ENABLED = 'machineLearning.enabled',
MACHINE_LEARNING_URL = 'machineLearning.url',
@ -94,9 +100,6 @@ export enum SystemConfigKey {
TRASH_DAYS = 'trash.days',
THEME_CUSTOM_CSS = 'theme.customCss',
LIBRARY_SCAN_ENABLED = 'library.scan.enabled',
LIBRARY_SCAN_CRON_EXPRESSION = 'library.scan.cronExpression',
}
export enum TranscodePolicy {
@ -144,6 +147,15 @@ export enum Colorspace {
P3 = 'p3',
}
export enum LogLevel {
VERBOSE = 'verbose',
DEBUG = 'debug',
LOG = 'log',
WARN = 'warn',
ERROR = 'error',
FATAL = 'fatal',
}
export interface SystemConfig {
ffmpeg: {
crf: number;
@ -165,6 +177,10 @@ export interface SystemConfig {
tonemap: ToneMapping;
};
job: Record<QueueName, { concurrency: number }>;
logging: {
enabled: boolean;
level: LogLevel;
};
machineLearning: {
enabled: boolean;
url: string;