Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
fix: no trace info in winston log (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroqn authored Dec 28, 2022
1 parent e76bcd9 commit 06a78bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/api-server/src/app/cluster.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import { startOpentelemetry } from "../opentelemetry";
// Start before logger
startOpentelemetry();

import cluster from "cluster";
import { cpus } from "os";
import { envConfig } from "../base/env-config";
import { logger } from "../base/logger";
import { BlockEmitter } from "../block-emitter";
import { CKBPriceOracle } from "../price-oracle";
import { initSentry } from "../sentry";
import { startOpentelemetry } from "../opentelemetry";

const numCPUs = cpus().length;
const clusterCount = +(envConfig.clusterCount || 0);
const numOfCluster = clusterCount || numCPUs;

startOpentelemetry();

if (cluster.isMaster) {
logger.info(`Master ${process.pid} is running`);

Expand Down

0 comments on commit 06a78bb

Please sign in to comment.