def METHOD_NAME(self):
    while True:
        secMsg = self.__messagesQueue.get()
        msgTime = secMsg[0]
        path = "%s/%s/%02d" % (self.__basePath, msgTime.year, msgTime.month)
        mkDir(path)
        logFile = "%s/%s%02d%02d.security.log.csv" % (path, msgTime.year, msgTime.month, msgTime.day)
        if not os.path.isfile(logFile):
            fd = open(logFile, "w")
            fd.write(
                "Time, Success, Source IP, Source Port, source Identity, destinationIP,\
       destinationPort, destinationService, action\n"
            )
        else:
            fd = open(logFile, "a")
        fd.write(f"{', '.join([str(item) for item in secMsg])}\n")
        fd.close()