debug: improve logging with REQ
This commit is contained in:
parent
083496943a
commit
8f07fe8a23
|
@ -10,7 +10,7 @@ const debug = Debug('ditto:client');
|
|||
function getFilters<K extends number>(filters: Filter<K>[], opts: GetFiltersOpts = {}): Promise<Event<K>[]> {
|
||||
if (opts.signal?.aborted) return Promise.resolve([]);
|
||||
if (!filters.length) return Promise.resolve([]);
|
||||
debug(JSON.stringify(filters));
|
||||
debug('REQ', JSON.stringify(filters));
|
||||
|
||||
return new Promise((resolve) => {
|
||||
const results: Event[] = [];
|
||||
|
|
|
@ -58,7 +58,7 @@ class Reqmeister extends EventEmitter<{ [filterId: string]: (event: Event) => an
|
|||
if (wantedAuthors.size) filters.push({ kinds: [0], authors: [...wantedAuthors] });
|
||||
|
||||
if (filters.length) {
|
||||
debug(JSON.stringify(filters));
|
||||
debug('REQ', JSON.stringify(filters));
|
||||
const events = await client.getFilters(filters, { signal: AbortSignal.timeout(timeout) });
|
||||
|
||||
for (const event of events) {
|
||||
|
|
Loading…
Reference in New Issue