MCPcopy Create free account
hub / github.com/adobe/Marinus / __init__

Method __init__

python3_cron_scripts/libs3/SplunkHECManager.py:87–101  ·  view source on GitHub ↗

Class initialization

(self, log_level=None)

Source from the content-addressed store, hash-verified

85 self.HEADERS = {"Authorization": "Splunk {}".format(self.ACCESS_TOKEN)}
86
87 def __init__(self, log_level=None):
88 """
89 Class initialization
90 """
91 self._logger = self._log()
92 if log_level is not None:
93 self._logger.setLevel(log_level)
94
95 config = configparser.ConfigParser()
96 config_file = config.read(self.splunk_config_file)
97 if len(config_file) == 0:
98 self._logger.error("Error: Could not find the config file")
99 exit(1)
100
101 self._init_splunk_hec_connection(config)
102
103 def push_to_splunk_hec(
104 self, source, message, endpoint=HECEndpoint.EVENT, level=HECLogLevel.INFO

Callers

nothing calls this directly

Calls 2

_logMethod · 0.95

Tested by

no test coverage detected