Skip to content

Commit

Permalink
feat: add a CE whitelist for remote logging
Browse files Browse the repository at this point in the history
  • Loading branch information
martynia committed Jan 24, 2024
1 parent b6b9961 commit b341099
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,16 @@ def __initJSON2(self):
self.loggerTimerInterval = int(pilotOptions.get("RemoteLoggerTimerInterval", self.loggerTimerInterval))
# logger buffer size in lines:
self.loggerBufsize = max(1, int(pilotOptions.get("RemoteLoggerBufsize", self.loggerBufsize)))
# logger CE white list
loggerCEsWhiteList = pilotOptions.get("RemoteLoggerCEsWhiteList")
# restrict remote logging to whitelisted CEs ([] or None => no restriction)
self.log.debug("JSON: Remote logging CE white list: %s" % loggerCEsWhiteList)
if loggerCEsWhiteList is not None:
if not isinstance(loggerCEsWhiteList, list):
loggerCEsWhiteList = [elem.strip() for elem in loggerCEsWhiteList.split(",")]
if self.ceName not in loggerCEsWhiteList:
self.pilotLogging = False
self.log.debug("JSON: Remote logging disabled for this CE: %s" % self.ceName)
pilotLogLevel = pilotOptions.get("PilotLogLevel", "INFO")
if pilotLogLevel.lower() == "debug":
self.debugFlag = True
Expand Down

0 comments on commit b341099

Please sign in to comment.