Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, dir, reader=None):
"""
create a LogReader
:param dir: the dir where log file is.
:param reader: create a new LogReader with a formal one
"""
self.dir = dir
self.reader = reader if reader else core.LogReader(dir)