Skip to content

Commit

Permalink
adding krkn report location
Browse files Browse the repository at this point in the history
Signed-off-by: Paige Rubendall <[email protected]>
  • Loading branch information
paigerube14 authored and chaitanyaenr committed Jan 25, 2024
1 parent 60ece4b commit f154bcb
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions run_kraken.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from krkn_lib.utils.functions import get_yaml_item_value



report_file = ""

# Main function
def main(cfg):
Expand Down Expand Up @@ -414,10 +414,9 @@ def main(cfg):
)
sys.exit(1)

run_dir = os.getcwd() + "/kraken.report"
logging.info(
"Successfully finished running Kraken. UUID for the run: "
"%s. Report generated at %s. Exiting" % (run_uuid, run_dir)
"%s. Report generated at %s. Exiting" % (run_uuid, report_file)
)
else:
logging.error("Cannot find a config at %s, please check" % (cfg))
Expand All @@ -434,12 +433,21 @@ def main(cfg):
help="config location",
default="config/config.yaml",
)
parser.add_option(
"-o",
"--output",
dest="output",
help="output report location",
default="kraken.report",
)

(options, args) = parser.parse_args()
report_file = options.output
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(message)s",
handlers=[
logging.FileHandler("kraken.report", mode="w"),
logging.FileHandler(report_file, mode="w"),
logging.StreamHandler(),
],
)
Expand Down

0 comments on commit f154bcb

Please sign in to comment.