We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c01de65 commit a6ed6a9Copy full SHA for a6ed6a9
1 file changed
code_counting/__main__.py
@@ -49,10 +49,28 @@ def main(root):
49
50
root = ''
51
52
+ debug = False
53
+
54
+ # save_debug_log = ''
55
56
for index, item in enumerate(sys.argv[1:]):
57
if index != (len(sys.argv) - 2):
58
root += item + ' '
59
+ if '-d' is item:
60
+ debug = True
61
+ # if index+1 < len(sys.argv[1:]):
62
+ # save_debug_log = sys.argv[index+1]
63
else:
64
root += item
65
66
+ if debug:
67
+ logging.getLogger().setLevel(logging.DEBUG)
68
+ else:
69
+ logging.basicConfig(filename='log.txt',
70
+ filemode='a',
71
+ format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
72
+ datefmt='%H:%M:%S',
73
+ level=logging.DEBUG)
74
+ logging.getLogger('Code-Counting')
75
76
main(root)
0 commit comments