Skip to content

Commit

Permalink
Added LOG_STDOUT support
Browse files Browse the repository at this point in the history
Ref #56
  • Loading branch information
aminlatifi committed Jun 7, 2023
1 parent c6f4dc0 commit 7105227
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config/test.env
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ GIVETH_IO_THIRD_PARTY_MICRO_SERVICE=givethio

GIV_ECONOMY_THIRD_PARTY_SECRET=secret
GIV_ECONOMY_THIRD_PARTY_MICRO_SERVICE=giveconomy-notification-service

# OPTIONAL - force logging to stdout when the value is true
LOG_STDOUT=false
3 changes: 2 additions & 1 deletion src/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ function createBunyanLogger() {

if (
process.env.NODE_ENV === 'development' ||
process.env.NODE_ENV === 'test'
process.env.NODE_ENV === 'test' ||
process.env.LOG_STDOUT === 'true'
) {
// Adding logs to console in local machine and running tests
bunyanStreams.push({
Expand Down

0 comments on commit 7105227

Please sign in to comment.