add types to public api for dittoconf

This commit is contained in:
Siddharth Singh 2025-04-06 15:40:42 +05:30
parent d3a15a699e
commit 1b19ff415a
No known key found for this signature in database

View file

@ -238,10 +238,14 @@ export class DittoConf {
}; };
} }
get logConfig() { get logConfig(): {
fmt: 'jsonl' | 'pretty';
level: string;
scopes: string[];
} {
const [fmt = 'jsonl', level = 'debug', scopes = ''] = (this.env.get('DEBUG') || '').split(':'); const [fmt = 'jsonl', level = 'debug', scopes = ''] = (this.env.get('DEBUG') || '').split(':');
return { return {
fmt, fmt: fmt === 'jsonl' ? fmt : 'pretty',
level, level,
scopes: scopes.split(',').filter(Boolean), scopes: scopes.split(',').filter(Boolean),
}; };