Fix Windows mpv logging and add log export (#88)

This commit is contained in:
2026-05-26 00:31:38 -07:00
committed by GitHub
parent 43ebc7d371
commit 11c196821d
150 changed files with 2748 additions and 582 deletions
+30
View File
@@ -100,6 +100,36 @@ export function applyCoreDomainConfig(context: ResolveContext): void {
'Expected debug, info, warn, or error.',
);
}
const logRotation = src.logging.rotation;
if (typeof logRotation === 'number' && Number.isInteger(logRotation) && logRotation > 0) {
resolved.logging.rotation = logRotation;
} else if (src.logging.rotation !== undefined) {
warn(
'logging.rotation',
src.logging.rotation,
resolved.logging.rotation,
'Expected a positive whole number of days.',
);
}
if (isObject(src.logging.files)) {
for (const key of ['app', 'launcher', 'mpv'] as const) {
const enabled = asBoolean(src.logging.files[key]);
if (enabled !== undefined) {
resolved.logging.files[key] = enabled;
} else if (src.logging.files[key] !== undefined) {
warn(
`logging.files.${key}`,
src.logging.files[key],
resolved.logging.files[key],
'Expected boolean.',
);
}
}
} else if (src.logging.files !== undefined) {
warn('logging.files', src.logging.files, resolved.logging.files, 'Expected object.');
}
}
applyControllerConfig(context);