Skip to content

Commit

Permalink
allow regex exclusion via env
Browse files Browse the repository at this point in the history
allow BUF_LIMIT via env
  • Loading branch information
leeliu committed Sep 12, 2017
1 parent f3e8000 commit 21c0c4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ checkElevated()
parsedConfig.exclude = process.env.LOGDNA_EXCLUDE;
}

// allow exclude regex to be passed via env
if (process.env.LOGDNA_EXCLUDE_REGEX) {
parsedConfig.exclude_regex = process.env.LOGDNA_EXCLUDE_REGEX;
}

if (!program.key && !parsedConfig.key) {
console.error('LogDNA Ingestion Key not set! Use -k to set or use environment variable LOGDNA_AGENT_KEY.');
process.exit();
Expand Down
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
, RESCAN_INTERVAL_K8S: 10000 // 10 sec
, FLUSH_INTERVAL: 250
, FLUSH_LIMIT: 5000
, BUF_LIMIT: 10000
, BUF_LIMIT: process.env.BUF_LIMIT || 10000
, MAX_SOCKETS: 20
, HTTP_TIMEOUT: 30000
, HTTP_KEEPALIVE: 60000
Expand Down

0 comments on commit 21c0c4c

Please sign in to comment.