Class: Contrast::Agent::Reporting::Settings::SecurityLogger
- Defined in:
- lib/contrast/agent/reporting/settings/security_logger.rb
Overview
this class will hold the security logger settings.
Instance Method Summary collapse
-
#initialize ⇒ SecurityLogger
constructor
A new instance of SecurityLogger.
-
#log_file ⇒ Object
Where to log the agent’s log file, if set by the user.
-
#log_file=(log_file) ⇒ Object
Set the log file.
-
#log_level ⇒ Object
The level at which the agent should log.
-
#log_level=(log_level) ⇒ Object
set the log level.
-
#not_blank! ⇒ Boolean
Set the state of settings.
-
#settings_blank? ⇒ Boolean
check to see if object is being used.
- #syslog ⇒ Object
- #to_controlled_hash ⇒ Object
Constructor Details
#initialize ⇒ SecurityLogger
Returns a new instance of SecurityLogger.
12 13 14 |
# File 'lib/contrast/agent/reporting/settings/security_logger.rb', line 12 def initialize @blank = true end |
Instance Method Details
#log_file ⇒ Object
Where to log the agent’s log file, if set by the user. Overridden by agent.logger.path if set in a local configuration.
50 51 52 |
# File 'lib/contrast/agent/reporting/settings/security_logger.rb', line 50 def log_file @_log_file ||= Contrast::Utils::ObjectShare::EMPTY_STRING end |
#log_file=(log_file) ⇒ Object
Set the log file
58 59 60 |
# File 'lib/contrast/agent/reporting/settings/security_logger.rb', line 58 def log_file= log_file @_log_file = log_file if log_file.is_a?(String) end |
#log_level ⇒ Object
The level at which the agent should log. Overridden by agent.logger.level if set in a local configuration
34 35 36 |
# File 'lib/contrast/agent/reporting/settings/security_logger.rb', line 34 def log_level @_log_level ||= Contrast::Utils::ObjectShare::EMPTY_STRING end |
#log_level=(log_level) ⇒ Object
set the log level
42 43 44 |
# File 'lib/contrast/agent/reporting/settings/security_logger.rb', line 42 def log_level= log_level @_log_level = log_level if log_level.is_a?(String) end |
#not_blank! ⇒ Boolean
Set the state of settings
26 27 28 |
# File 'lib/contrast/agent/reporting/settings/security_logger.rb', line 26 def not_blank! @blank = false end |
#settings_blank? ⇒ Boolean
check to see if object is being used
19 20 21 |
# File 'lib/contrast/agent/reporting/settings/security_logger.rb', line 19 def settings_blank? @blank end |
#syslog ⇒ Object
62 63 64 |
# File 'lib/contrast/agent/reporting/settings/security_logger.rb', line 62 def syslog @_syslog ||= Contrast::Agent::Reporting::Settings::Syslog.new end |
#to_controlled_hash ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/contrast/agent/reporting/settings/security_logger.rb', line 66 def to_controlled_hash { level: log_level, path: log_file, syslog: syslog.to_controlled_hash } end |