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 23, 2024
1 parent b6b9961 commit 9a1fb3c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,15 @@ 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", None)
# restrict remote logging to a whitelisted CEs ([] => no restriction)
if not isinstance(loggerCEsWhiteList, list):
loggerCEsWhiteList = [elem.strip() for elem in loggerCEsWhiteList.split(",")]
self.log.debug("JSON: Remote logging CE white list: %s" % loggerCEsWhiteList)
if loggerCEsWhiteList is not None and 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 9a1fb3c

Please sign in to comment.