| Conditions | 6 |
| Total Lines | 10 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Определяет логирование процесса.""" |
||
| 20 | def writelog(logmsg): |
||
| 21 | """Пишет лог, если так указано в конфиге.""" |
||
| 22 | if os.path.isfile(opt_logname) is False: |
||
| 23 | pass |
||
| 24 | elif check_logging_opt() is True: |
||
| 25 | with open(opt_logname, 'a') as log: |
||
| 26 | log.write(f'{logmsg}\n') |
||
| 27 | elif check_logging_opt() == 'ERR': |
||
| 28 | with open(opt_logname, 'a') as log: |
||
| 29 | log.write('Logging config error!') |
||
| 30 |