mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
add types to public api for dittoconf
This commit is contained in:
parent
d3a15a699e
commit
1b19ff415a
1 changed files with 6 additions and 2 deletions
|
|
@ -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),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue