Skip to content

Commit

Permalink
SC-8544: added geoipenabled to options
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanrahic committed Aug 20, 2020
1 parent 43ece55 commit 0e96bd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions bin/logagent.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,13 @@ LaCli.prototype.loadPlugins = function (configFile) {
debug: false
})
}
if (this.argv.geoipEnabled) {
outputFilter.push({
module: 'geoip',
fields: this.argv.geoIPField || null,
debug: false
})
}
if (this.argv.cfhttp) {
outputFilter.push({
module: 'cloudfoundry-format'
Expand Down
3 changes: 2 additions & 1 deletion lib/core/cliArgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ module.exports = (function () {
}
// overwrite env var from CLI for logsene-js
process.LOGSENE_MAX_MESSAGE_FIELD_SIZE = argv.maxLogSize
if (process.env.GEOIP_ENABLED === 'true' && argv.geoipFields === undefined) {

if (process.env.GEOIP_ENABLED === 'true' && argv.geoipField === undefined) {
argv.geoipEnabled = true
}
if (argv.geoipEnabled === 'true' || argv.geoipEnabled === true) {
Expand Down

0 comments on commit 0e96bd8

Please sign in to comment.