Skip to content

Commit

Permalink
Fix warn logs
Browse files Browse the repository at this point in the history
  • Loading branch information
melisaguevara committed Nov 26, 2024
1 parent 8acc261 commit b59aa5c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/indexer-api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function initializeRedis(
return new Promise<Redis>((resolve, reject) => {
redis.on("ready", () => {
logger.debug({
at: "IndexerAPI",
at: "IndexerAPI#initializeRedis",
message: "Redis connection established",
config,
});
Expand All @@ -28,7 +28,7 @@ async function initializeRedis(

redis.on("error", (err) => {
logger.error({
at: "IndexerAPI",
at: "IndexerAPI#initializeRedis",
message: "Redis connection failed",
notificationPath: "across-indexer-error",
error: err,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export class AcrossIndexerManager {

private startHubPoolIndexer() {
if (!this.config.enableHubPoolIndexer) {
this.logger.warn("Hub pool indexer is disabled");
this.logger.warn({
at: "Indexer#AcrossIndexerManager#startHubPoolIndexer",
message: "Hub pool indexer is disabled",
});
return;
}
const hubPoolIndexerDataHandler = new HubPoolIndexerDataHandler(
Expand Down Expand Up @@ -113,7 +116,10 @@ export class AcrossIndexerManager {
this.spokePoolIndexers = spokePoolIndexers;

if (this.spokePoolIndexers.length === 0) {
this.logger.warn("No spoke pool indexers to start");
this.logger.warn({
at: "Indexer#AcrossIndexerManager#startSpokePoolIndexers",
message: "No spoke pool indexers to start",
});
return;
}
return Promise.all(
Expand Down
15 changes: 12 additions & 3 deletions packages/indexer/src/services/BundleServicesManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ export class BundleServicesManager {

private startBundleIncludedEventsService() {
if (!this.config.enableBundleIncludedEventsService) {
this.logger.warn("Bundle included events service is disabled");
this.logger.warn({
at: "Indexer#BundleServicesManager#startBundleIncludedEventsService",
message: "Bundle included events service is disabled",
});
return;
}
this.bundleIncludedEventsService = new BundleIncludedEventsService({
Expand All @@ -62,7 +65,10 @@ export class BundleServicesManager {

private startBundleEventsProcessor() {
if (!this.config.enableBundleEventsProcessor) {
this.logger.warn("Bundle events processor is disabled");
this.logger.warn({
at: "Indexer#BundleServicesManager#startBundleEventsProcessor",
message: "Bundle events processor is disabled",
});
return;
}
this.bundleEventsProcessor = new BundleEventsProcessor({
Expand All @@ -76,7 +82,10 @@ export class BundleServicesManager {

private startBundleBuilderService() {
if (!this.config.enableBundleBuilder) {
this.logger.warn("Bundle builder service is disabled");
this.logger.warn({
at: "Indexer#BundleServicesManager#startBundleBuilderService",
message: "Bundle builder service is disabled",
});
return;
}

Expand Down

0 comments on commit b59aa5c

Please sign in to comment.