Skip to content

Commit

Permalink
Merge pull request #60 from Giveth/feat/logger_stdout
Browse files Browse the repository at this point in the history
Added LOG_STDOUT support
  • Loading branch information
jainkrati authored Jan 25, 2024
2 parents 057397a + ad92e91 commit 5578c54
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 5578c54

Please sign in to comment.