Skip to content

Commit d5a504e

Browse files
committed
better logging message
1 parent fb7dd7e commit d5a504e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

log.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ def initialize(self, log_verbosity, log_file=None):
6767
elif os.path.isdir(os.path.dirname(l)):
6868
handler = logging.FileHandler(l)
6969
else:
70-
raise Exception('Invalid log: {}'.format(l))
70+
if not os.path.exists(l):
71+
raise Exception('{} not found'.format(os.path.dirname(l)))
72+
else:
73+
raise Exception('Invalid log: {}'.format(l))
7174
handler.setLevel(logging.DEBUG)
7275
for i in range(log_verbosity + 1):
7376
if handler not in v[i].handlers:

0 commit comments

Comments
 (0)