diff --git a/packages/codegen/src/templates/package-template.handlebars b/packages/codegen/src/templates/package-template.handlebars index 1815fcfc..90306d43 100644 --- a/packages/codegen/src/templates/package-template.handlebars +++ b/packages/codegen/src/templates/package-template.handlebars @@ -75,6 +75,7 @@ "eslint-plugin-standard": "^5.0.0", "husky": "^7.0.2", "ts-node": "^10.2.1", - "typescript": "^5.0.2" + "typescript": "^5.0.2", + "winston": "^3.13.0" } } diff --git a/packages/codegen/src/templates/resolvers-template.handlebars b/packages/codegen/src/templates/resolvers-template.handlebars index 8e934dc0..927606af 100644 --- a/packages/codegen/src/templates/resolvers-template.handlebars +++ b/packages/codegen/src/templates/resolvers-template.handlebars @@ -83,7 +83,7 @@ const executeAndRecordMetrics = async ( export const createResolvers = async ( indexerArg: IndexerInterface, - eventWatcher: EventWatcher + eventWatcher: EventWatcher, gqlLogger: winston.Logger ): Promise => { const indexer = indexerArg as Indexer; diff --git a/packages/util/src/logger.ts b/packages/util/src/logger.ts index 0b856098..5bc86815 100644 --- a/packages/util/src/logger.ts +++ b/packages/util/src/logger.ts @@ -9,9 +9,9 @@ export const createGQLLogger = (logsDir = ''): winston.Logger => { winston.format.json() ), transports: [ - // Write all logs with importance level of `error` or less to `error.log` + // Write all logs with importance level of `error` or less to `watcher-gql-error.log` new winston.transports.File({ filename: path.resolve(logsDir, 'watcher-gql-error.log'), level: 'error' }), - // Write all logs with importance level of `info` or less to `combined.log` + // Write all logs with importance level of `info` or less to `watcher-gql.log` new winston.transports.File({ filename: path.resolve(logsDir, 'watcher-gql.log') }) ] });