Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: logging level configuration #280

Merged
merged 4 commits into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ Or use the frontend to adjust configurations after launching the application.
| BINANCE_LOCAL_TUNNEL_SUBDOMAIN | Local tunnel public URL subdomain | binance |
| BINANCE_AUTHENTICATION_ENABLED | Enable/Disable frontend authentication | true |
| BINANCE_AUTHENTICATION_PASSWORD | Frontend password | 123456 |
| BINANCE_LOG_LEVEL | Logging level. [Possible values described on `bunyan` docs.](https://www.npmjs.com/package/bunyan#levels) | ERROR |

*A local tunnel makes the bot accessible from the outside. Please set the subdomain of the local tunnel as a subdomain that only you can remember.*
*You must change the authentication password; otherwise, it will be configured as the default password.*
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const logger = bunyan.createLogger({
name: 'binance-api',
version: packageJson.version,
serializers: bunyan.stdSerializers,
streams: [{ stream: process.stdout, level: bunyan.TRACE }]
streams: [{ stream: process.stdout, level: process.env.BINANCE_LOG_LEVEL || 'TRACE' }]
});
logger.info({ NODE_ENV: process.env.NODE_ENV }, 'API logger loaded');

Expand Down
1 change: 1 addition & 0 deletions docker-compose.rpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
environment:
# - BINANCE_MODE=test
- BINANCE_MODE=live
- BINANCE_LOG_LEVEL=ERROR
- BINANCE_REDIS_HOST=binance-redis
- BINANCE_REDIS_PORT=6379
- BINANCE_REDIS_PASSWORD=secretp422
Expand Down