Skip to content

Commit

Permalink
fix wrong logging default configuration (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanguyvda authored and kduret committed Feb 14, 2023
1 parent 59577f5 commit 3de47bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function EventQueue.new(params)
self.fail = false

-- set up log configuration
local logfile = params.logfile or "/var/log/centreon-broker/stream-connector.log"
local log_level = params.log_level or 2
local logfile = params.logfile or "/var/log/centreon-broker/splunk-events.log"
local log_level = params.log_level or 1

-- initiate mandatory objects
self.sc_logger = sc_logger.new(logfile, log_level)
Expand All @@ -63,8 +63,6 @@ function EventQueue.new(params)
self.sc_params.params.splunk_host = params.splunk_host or "Central"
self.sc_params.params.accetepd_categories = params.acceptd_categories or "neb"
self.sc_params.params.accetepd_elements = params.accepted_elements or "host_status,service_status"
self.sc_params.params.logfile = params.logfile or "/var/log/centreon-broker/splunk-events-apiv2.log"
self.sc_params.params.log_level = params.log_level or 1

-- apply users params and check syntax of standard ones
self.sc_params:param_override(params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ function EventQueue.new(params)
self.fail = false

-- set up log configuration
local logfile = params.logfile or "/var/log/centreon-broker/stream-connector.log"
local log_level = params.log_level or 2
local logfile = params.logfile or "/var/log/centreon-broker/splunk-metrics.log"
local log_level = params.log_level or 1

-- initiate mandatory objects
self.sc_logger = sc_logger.new(logfile, log_level)
Expand All @@ -62,8 +62,6 @@ function EventQueue.new(params)
self.sc_params.params.accetepd_categories = params.accepted_categories or "neb"
self.sc_params.params.accetepd_elements = params.accepted_elements or "host_status,service_status"
self.sc_params.params.hard_only = params.hard_only or 0
self.sc_params.params.logfile = params.logfile or "/var/log/centreon-broker/splunk-metrics-apiv2.log"
self.sc_params.params.log_level = params.log_level or 1
self.sc_params.params.enable_host_status_dedup = params.enable_host_status_dedup or 0
self.sc_params.params.enable_service_status_dedup = params.enable_service_status_dedup or 0

Expand Down

0 comments on commit 3de47bd

Please sign in to comment.