add log configuration variables

This commit is contained in:
Siddharth Singh 2025-04-06 15:20:17 +05:30
parent feab5f8cd0
commit 5dc2cc405f
No known key found for this signature in database

View file

@ -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';