mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
add log configuration variables
This commit is contained in:
parent
feab5f8cd0
commit
5dc2cc405f
1 changed files with 13 additions and 0 deletions
|
|
@ -238,6 +238,19 @@ export class DittoConf {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isCI() {
|
||||||
|
return this.env.get('CI') === 'true';
|
||||||
|
}
|
||||||
|
|
||||||
|
get logConfig() {
|
||||||
|
const [fmt = 'jsonl', level = 'debug', scopes = ''] = (this.env.get('DEBUG') || '').split(':');
|
||||||
|
return {
|
||||||
|
fmt,
|
||||||
|
level,
|
||||||
|
scopes: scopes.split(',').filter(Boolean),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/** nostr.build API endpoint when the `nostrbuild` uploader is used. */
|
/** nostr.build API endpoint when the `nostrbuild` uploader is used. */
|
||||||
get nostrbuildEndpoint(): string {
|
get nostrbuildEndpoint(): string {
|
||||||
return this.env.get('NOSTRBUILD_ENDPOINT') || 'https://nostr.build/api/v2/upload/files';
|
return this.env.get('NOSTRBUILD_ENDPOINT') || 'https://nostr.build/api/v2/upload/files';
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue