| Conditions | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 10 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | import os |
||
| 8 | def __init__(self, save_directory, name, enable_printing=True): |
||
| 9 | """ |
||
| 10 | Save logged output to a text file |
||
| 11 | :param save_directory: Directory to save log files to |
||
| 12 | :param name: Name of process being logged |
||
| 13 | """ |
||
| 14 | self.filename = str(save_directory) + '/_logs/' + str(datetime.now().strftime("%Y-%m-%d")) + '.txt' |
||
| 15 | self.name = name |
||
| 16 | self.log_file = self.setup_custom_logger() |
||
| 17 | self.enable_printing = enable_printing |
||
| 18 | |||
| 39 |