(src, param, newlog=False)
| 36 | g_loglevel = 0 |
| 37 | |
| 38 | def dinit(src, param, newlog=False): |
| 39 | if 'LogFile' in param: |
| 40 | global g_logfile |
| 41 | g_logfile = param['LogFile'] |
| 42 | |
| 43 | if 'LogLevel' in param: |
| 44 | global g_loglevel |
| 45 | g_loglevel = { "Normal": 0, "High": 2, "Off": -1 }.get(param['LogLevel'], 0) |
| 46 | |
| 47 | if not g_loglevel==-1 and not g_logfile=='' and newlog: |
| 48 | f = open(g_logfile, 'w') |
| 49 | f.close() |
| 50 | |
| 51 | dprint(src, 0, "Started") |
| 52 | |
| 53 | |
| 54 |