preprocessing.py
def parse_logs(self, log_file, log_format):
        """
        Parse the logs using Spell method

        log_file: The input log file name
        """
        input_dir = '../logs/'+log_format+"/"  # The input directory of log file
        output_dir = 'Spell_result/'  # The output directory of parsing results
        tau = 0.5  # Message type threshold (default: 0.5)
        regex = []  # Regular expression list for optional preprocessing (default: [])

        if log_format == "AWS":
            aws_agent = AWSLogAnalyzer(log_file, input_dir, read_all_file=False)
            #  convert AWS CloudTrail logs into a "logparser" readable format
            log_file = aws_agent.pre_process_logs_for_encoder(dst_dir=input_dir, dst_file="aws_preprocessed.log", debug=False)

        parser = Spell.LogParser(indir=input_dir, outdir=output_dir, log_format=self.log_formats[log_format], tau=tau, rex=regex)
        parsed_logs = parser.parse(log_file)
        return parsed_logs

        Parse the logs using Spell method

        log_file: The input log file name
        
Parse the logs using Spell method
log_file: The input log file name
Parse the logs using Spell method log_file : The input log file name
def parse_logs(self, log_file, log_format):
        input_dir = '../logs/'+log_format+"/"  
        output_dir = 'Spell_result/'  
        tau = 0.5  
        regex = []  
        if log_format == "AWS":
            aws_agent = AWSLogAnalyzer(log_file, input_dir, read_all_file=False)
            log_file = aws_agent.pre_process_logs_for_encoder(dst_dir=input_dir, dst_file="aws_preprocessed.log", debug=False)
        parser = Spell.LogParser(indir=input_dir, outdir=output_dir, log_format=self.log_formats[log_format], tau=tau, rex=regex)
        parsed_logs = parser.parse(log_file)
        return parsed_logs
def parse_logs ( self , log_file , log_format ) : input_dir = '../logs/' + log_format + "/" output_dir = 'Spell_result/' tau = 0.5 regex = [ ] if log_format == "AWS" : aws_agent = AWSLogAnalyzer ( log_file , input_dir , read_all_file = False ) log_file = aws_agent . pre_process_logs_for_encoder ( dst_dir = input_dir , dst_file = "aws_preprocessed.log" , debug = False ) parser = Spell . LogParser ( indir = input_dir , outdir = output_dir , log_format = self . log_formats [ log_format ] , tau = tau , rex = regex ) parsed_logs = parser . parse ( log_file ) return parsed_logs
Parse the logs using Spell method
log_file: The input log file name
Parse the logs using Spell method log_file : The input log file name
"""
        Parse the logs using Spell method

        log_file: The input log file name
        """ # The input directory of log file # The output directory of parsing results # Message type threshold (default: 0.5) # Regular expression list for optional preprocessing (default: []) #  convert AWS CloudTrail logs into a "logparser" readable format
self
log_file
log_format