]>
git.ipfire.org Git - people/ms/nitsi.git/blob - nitsi
6 logger
= logging
.getLogger("nitsi")
7 logger
.setLevel(logging
.DEBUG
)
8 # create file handler which logs even debug messages
9 fh
= logging
.FileHandler('nitsi.log')
10 fh
.setLevel(logging
.DEBUG
)
11 # create console handler with a higher log level
12 ch
= logging
.StreamHandler()
13 ch
.setLevel(logging
.DEBUG
)
15 formatter
= logging
.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
16 fh
.setFormatter(formatter
)
17 ch
.setFormatter(formatter
)
18 # add the handlers to the logger
22 if __name__
== "__main__":
25 parser
= argparse
.ArgumentParser()
27 parser
.add_argument("-d", "--directory", dest
="dir")
29 args
= parser
.parse_args()
31 currenttest
= test(args
.dir)
32 currenttest
.read_settings()
33 currenttest
.virtual_environ_setup()
34 currenttest
.load_recipe()
36 currenttest
.virtual_environ_start()
37 currenttest
.run_recipe()
38 except BaseException
as e
:
41 currenttest
.virtual_environ_stop()