Skip to content

Commit 54b044c

Browse files
feat: 'Eko.getLoggerInstaceUUID'
1 parent 76bff71 commit 54b044c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/core/eko.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ export class Eko {
4242
return logger;
4343
}
4444

45+
public getLoggerInstaceUUID(): string {
46+
if (this.ekoConfig.loggerInstaceUUID) {
47+
return this.ekoConfig.loggerInstaceUUID;
48+
} else {
49+
throw Error("loggerInstaceUUID is not configured");
50+
}
51+
}
52+
4553
private buildEkoConfig(ekoConfig: Partial<EkoConfig> | undefined): EkoConfig {
4654
if (!ekoConfig) {
4755
logger.warn("`ekoConfig` is missing when construct `Eko` instance");
@@ -51,6 +59,7 @@ export class Eko {
5159
chromeProxy: typeof chrome === 'undefined' ? undefined : chrome,
5260
callback: undefined,
5361
patchServerUrl: "http://127.0.0.1:8000/eko",
62+
loggerInstaceUUID: undefined,
5463
};
5564
return {
5665
...defaultEkoConfig,

src/types/eko.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export interface EkoConfig {
2727
chromeProxy?: any, // should be original `chrome` or a proxy created by `createChromeApiProxy()`
2828
callback?: WorkflowCallback,
2929
patchServerUrl?: string,
30+
loggerInstaceUUID?: string,
3031
}
3132

3233

0 commit comments

Comments
 (0)