Perform logging using the built in shared logger
(*stuff,
back=1,
file: Optional[IO[str]] = None,
no_prefix=False,
module_color=blue,
func_color=green,
console: Optional[Console] = console,
**kwargs)
| 309 | |
| 310 | |
| 311 | def log(*stuff, |
| 312 | back=1, |
| 313 | file: Optional[IO[str]] = None, |
| 314 | no_prefix=False, |
| 315 | module_color=blue, |
| 316 | func_color=green, |
| 317 | console: Optional[Console] = console, |
| 318 | **kwargs): |
| 319 | """ |
| 320 | Perform logging using the built in shared logger |
| 321 | """ |
| 322 | writer = console if file is None else Console(file=file, soft_wrap=True, tab_size=4, log_time_format=verbose_time_format) # shared |
| 323 | writer._log_render.time_format = verbose_time_format if verbose_log else slim_time_format |
| 324 | if no_prefix or not verbose_log: writer.log(*stuff, _stack_offset=2, **kwargs) |
| 325 | else: writer.log(get_log_prefix(back + 1, module_color, func_color), *stuff, _stack_offset=2, **kwargs) |
| 326 | |
| 327 | |
| 328 | def run(cmd, |
no test coverage detected