Skip to content

Commit

Permalink
add debug entries
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdml committed Dec 11, 2024
1 parent 9334317 commit 37b966b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dbos-runtime/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ export class DBOSRuntime {
if (fs.existsSync(operations)) {
const operationsURL = pathToFileURL(operations).href;
exports = (await import(operationsURL)) as Promise<ModuleExports>;
DBOS.globalLogger?.debug(`Loaded operations from ${operations}`);
} else {
throw new DBOSFailLoadOperationsError(`Failed to load operations from the entrypoint ${entrypoint}`);
}
const classes: object[] = [];
for (const key in exports) {
if (isObject(exports[key])) {
classes.push(exports[key] as object);
DBOS.globalLogger?.debug(`Loaded class ${key}`);
}
}
allClasses.push(...classes);
Expand Down

0 comments on commit 37b966b

Please sign in to comment.