feat(common): configure file log level
Allow operators to control how much diagnostic information is retained in file logs independently from live console output. Document the new startup setting and add regression coverage for its default behavior, runtime independence, and unsupported configurations.
This commit is contained in:
1 parent
e5f256f4dc
commit
227a62f2ad
6 files changed
+236
-27
No files matched your search
@@ -510,7 +510,7 @@ export function LogsPage() {
|
||||
<div>
|
||||
<div className="mb-2 flex flex-wrap items-center gap-x-1.5 gap-y-0.5">
|
||||
<span className="text-xs font-medium text-foreground">服务端日志级别</span>
|
||||
<span className="text-xs text-muted-foreground">· 仅影响控制台 / 实时流,文件始终落盘 debug</span>
|
||||
<span className="text-xs text-muted-foreground">· 仅影响控制台 / 实时流;文件落盘级别由环境变量决定,默认debug</span>
|
||||
</div>
|
||||
<div className="inline-flex flex-wrap gap-1 rounded-lg bg-muted/60 p-1">
|
||||
{LEVELS.map((lv) => {
|
||||
|
||||
@@ -249,7 +249,8 @@ export interface ApiClient {
|
||||
list(limit?: number): Promise<LogEntry[]>;
|
||||
/** Subscribe to the SSE log stream. Returns a disposer. */
|
||||
stream(options: LogsStreamOptions): () => void;
|
||||
/** Current console / subscriber level. File output is always debug. */
|
||||
/** Current console / subscriber level. File logging level is set via
|
||||
* SNOWLUMA_LOG_FILE_LEVEL (default: debug), independent of this method. */
|
||||
getLevel(): Promise<{ level: LogLevel; levels: LogLevel[] }>;
|
||||
/** Change the console / subscriber level at runtime. No restart needed. */
|
||||
setLevel(level: LogLevel): Promise<{ level: LogLevel; levels: LogLevel[] }>;
|
||||
|
||||
Reference in new issue
Block a user