Skip to content

Commit

Permalink
integrating directory reader into main file (#48)
Browse files Browse the repository at this point in the history
Co-authored-by: krady <[email protected]>
  • Loading branch information
kitrady and krady authored Jul 12, 2024
1 parent cf087d5 commit 30e03a4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/alogamous/__main__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from alogamous import analyzer, echo_analyzer, error_counter_analyzer, line_count_analyzer
from alogamous import analyzer, directory_reader, echo_analyzer, error_counter_analyzer, line_count_analyzer

with open("../../data/ex_log_01.txt") as log_file, open("../../data/test_output_file.txt", "a") as output_file:
with open("../../data/test_output_file.txt", "a") as output_file:
reader = directory_reader.DirectoryReader("../../data")
analyzer.analyze_log_stream(
[
echo_analyzer.EchoAnalyzer(),
error_counter_analyzer.ErrorCounterAnalyzer(),
line_count_analyzer.LineCountAnalyzer(),
],
log_file,
reader.read(),
output_file,
)

0 comments on commit 30e03a4

Please sign in to comment.