This is a message telling you that Curator attempted to initiate logging, but could not find a logging handler. This does not mean that the script failed, but does indicate that you can't see what logs Curator would otherwise be showing you.
You've made your own logging event class, but not set up any local logging. Everything inside that elg is stuck in elg and will only log when you call something in elg. Curator won't know what to do with that.
Perhaps if you put the log_event method calls inside your primary script and declared a regular python logger, not your class, it would work:
from elasticsearch import Elasticsearch
import curator
import logging
logger = logging.getLogger('my_script')
logger.setLevel(logging.DEBUG)
file_handler = logging.FileHandler('snap.log')
file_handler.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
file_handler.setFormatter(self.formatter)
logger.addHandler(self.file_handler)
indices_list = [2000]
for indice in indices_list:
REPOSITORY = 'index_backup'
…
if get_snapshot_state == 'SUCCESS':
logger.info('Successfully Created the Snapshot')
…
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.