diff options
Diffstat (limited to 'src/metadata.ts')
| -rw-r--r-- | src/metadata.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/metadata.ts b/src/metadata.ts index 1eb7f1a..a25e8bf 100644 --- a/src/metadata.ts +++ b/src/metadata.ts @@ -1,4 +1,7 @@ import { Db } from "mongodb"; +import winston from "winston"; + +import logger_config from "./util/logger"; /** //FIXME fix document schema * Rather than using branches as the core, this should be adopted into the following document model: @@ -18,6 +21,7 @@ export interface Branch { name: string; head: string; } +const logger = winston.createLogger(logger_config("META")); class Metadata { database: Db; @@ -36,6 +40,13 @@ class Metadata { .findOne({ org, repo, name: branch }); if (result !== null) { + logger.debug( + "Found commit %s for ORB %s/%s/%s", + result.head, + org, + repo, + branch + ); return result.head; } else { throw Error("Branch not found"); |
