# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# <h2>Log Parsing - Implement Code</h2>

import json
from json import JSONEncoder
import re
import time


# +
# TODO: Define log metrics class
# -

# http://stackoverflow.com/questions/3768895/how-to-make-a-class-json-serializable
class MyEncoder(JSONEncoder):
    def default(self, o):
        return o.__dict__ 


def process_robocopy_log(file_list):    
  # TODO: Parsing code for robocopy log

    return


# +
file_list = [
        r"..\Data\RobocopyLog\rocopylog_invalid_source.txt",
        r"..\Data\RobocopyLog\rocopylog.txt"]

start_time = time.time()

process_robocopy_log(file_list)

end_time = time.time()

print('Elapsed seconds: {0:.2f}s'.format(end_time-start_time))
# -



StarcoderdataJupyterScriptsDedupFiltered