Skip to content

Commit

Permalink
Merge pull request #4244 from apollographql/sachin/update-startup-log…
Browse files Browse the repository at this point in the history
…ging-for-schema-reporting

schema-reporting: Update startup logging for options
  • Loading branch information
sachindshinde authored Jun 15, 2020
2 parents bbed182 + bf8f4fe commit 0c9ca40
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions packages/apollo-engine-reporting/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -678,18 +678,20 @@ export class EngineReportingAgent<TContext = any> {
executableSchemaId: string;
executableSchema: string;
}) {
this.logger.info('Starting schema reporter...')

this.logger.info(
`Schema reporter options: ${JSON.stringify(
{
overrideReportedSchema: this.options.experimental_overrideReportedSchema,
schemaReportingInitialDelayMaxMs: this.options.experimental_schemaReportingInitialDelayMaxMs,
schemaReportingUrl: this.options.schemaReportingUrl,
}
)}`
)

this.logger.info('Starting schema reporter...');
if (this.options.experimental_overrideReportedSchema !== undefined) {
this.logger.info('Schema to report has been overridden');
}
if (this.options.experimental_schemaReportingInitialDelayMaxMs !== undefined) {
this.logger.info(`Schema reporting max initial delay override: ${
this.options.experimental_schemaReportingInitialDelayMaxMs
} ms`);
}
if (this.options.schemaReportingUrl !== undefined) {
this.logger.info(`Schema reporting URL override: ${
this.options.schemaReportingUrl
}`);
}
if (this.currentSchemaReporter) {
this.currentSchemaReporter.stop();
}
Expand All @@ -714,7 +716,7 @@ export class EngineReportingAgent<TContext = any> {
};

this.logger.info(
`Schema reporter EdgeServerInfo: ${JSON.stringify(serverInfo)}`
`Schema reporting EdgeServerInfo: ${JSON.stringify(serverInfo)}`
)

// Jitter the startup between 0 and 10 seconds
Expand Down

0 comments on commit 0c9ca40

Please sign in to comment.