Skip to content

Commit

Permalink
enhanced help
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoldani committed Oct 5, 2022
1 parent 5e522ee commit c70090e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions yrca.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ def main(argv):
cli_error("wrong options used")
exit(-1)

# check & process command line arguments
if len(args) < 3:
cli_error("missing input arguments")
exit(-1)
eventLogLine = args[0]
applicationLogs = args[1]
templater = Templater(args[2])

# options to customise the execution of the explainer (with default values)
nSols = None # number of possible explanations to find (default: all)
rootCause = None # value for root cause (default: all)
Expand All @@ -47,6 +39,14 @@ def main(argv):
elif option in ["-v","--verbose"]:
verbose = True

# check & process command line arguments
if len(args) < 3:
cli_error("missing input arguments")
exit(-1)
eventLogLine = args[0]
applicationLogs = args[1]
templater = Templater(args[2])

# ******************
# * PARSING INPUTS *
# ******************
Expand Down Expand Up @@ -90,8 +90,8 @@ def cli_error(message):
# function for printing cli usage
def cli_help():
print("Usage of yrca.py is as follows:")
print(" yrca.py [OPTIONS] eventToBeExplained.json applicationLogs.json logParsingTemplates.yml")
print("where OPTIONS can be")
print(" yrca.py [OPTIONS] EVENT LOGS TEMPLATES")
print("where EVENT and LOGS are JSON files, TEMPLATES is a YAML file, and OPTIONS can be")
print(" [--help] to print a help on the usage of yrca.py")
print(" [-n N|--num=N] to set to N the amount of possible explanations to identify")
print(" [-r X|--root=X] to require X to be the root cause of identified explanations")
Expand Down

0 comments on commit c70090e

Please sign in to comment.