156 |
assert no_fatal_message == 0 or no_fatal_message == 1 |
assert no_fatal_message == 0 or no_fatal_message == 1 |
157 |
if no_fatal_message: prefix_string = "" |
if no_fatal_message: prefix_string = "" |
158 |
else: prefix_string = "Fatal Error: " |
else: prefix_string = "Fatal Error: " |
159 |
self(prefix_string + message, 1) |
self.log_to_term(prefix_string + message, 1) |
160 |
import Main |
#import Main |
161 |
Main.cleanup() |
#Main.cleanup() |
162 |
sys.exit(errlevel) |
sys.exit(errlevel) |
163 |
|
|
164 |
def exception_to_string(self, arglist = []): |
def exception_to_string(self, arglist = []): |
182 |
if (only_terminal == 0 or |
if (only_terminal == 0 or |
183 |
(only_terminal == 1 and self.log_file_open)): |
(only_terminal == 1 and self.log_file_open)): |
184 |
logging_func = self.__call__ |
logging_func = self.__call__ |
185 |
else: logging_func = self.log_to_term |
else: |
186 |
|
logging_func = self.log_to_term |
187 |
|
if verbosity >= self.term_verbosity: return |
188 |
|
|
189 |
logging_func(self.exception_to_string(), verbosity) |
logging_func(self.exception_to_string(), verbosity) |
190 |
|
|
191 |
|
|
192 |
Log = Logger() |
Log = Logger() |
193 |
|
|
194 |
|
|