Skip to content

Commit

Permalink
set level for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tanguyenvn committed Aug 14, 2024
1 parent 4026857 commit f9b5426
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ IPFS_HOSTNAME=ipfs
IPFS_PROTOCOL=http
IPFS_PORT=5001
METADATA_ENV=development
SENTRY_SAMPLE_RATE=0.1
SENTRY_SAMPLE_RATE=1
SENTRY_TRACES_SAMPLE_RATE=0.01
SENTRY_DSN=
LOG_LEVEL=debug
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import log from "loglevel";
import morgan from "morgan";
import path from "path";

log.enableAll();
log.setLevel((process.env.LOG_LEVEL as log.LogLevelDesc) || log.levels.INFO);

const envPath = path.resolve(".", process.env.NODE_ENV !== "production" ? ".env.development" : ".env");
// setup environment
Expand Down

0 comments on commit f9b5426

Please sign in to comment.