Skip to content

Commit

Permalink
fix: separate yagna-api related logs to a child namespace for readabi…
Browse files Browse the repository at this point in the history
…lity
  • Loading branch information
grisha87 committed Jul 11, 2024
1 parent ccebf81 commit dfd6241
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shared/yagna/yagnaApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class YagnaApi {

eventSource.addEventListener("runtime", (event) => observer.next(JSON.parse(event.data)));
eventSource.addEventListener("error", (error) => observer.error(error));

return () => eventSource.close();
});
},
Expand All @@ -155,7 +156,7 @@ export class YagnaApi {

this.gsb = gsbClient.requestor;

this.logger = options?.logger ?? defaultLogger("yagna");
this.logger = options?.logger ? options.logger.child("yagna") : defaultLogger("yagna");

const identityClient = new YaTsClient.IdentityApi.Client({
BASE: this.basePath,
Expand Down

0 comments on commit dfd6241

Please sign in to comment.