9f90ec06ab1a775b48a2023d22e411dad6b7eddb
3 # Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 # SPDX-License-Identifier: GPL-2.0-only
7 from typing
import Callable
, Optional
11 def __init__(self
, log
: Optional
[Callable
[[str], None]]):
12 self
._logging
_function
: Optional
[Callable
[[str], None]] = log
14 def _log(self
, msg
: str) -> None:
15 if self
._logging
_function
:
16 self
._logging
_function
(msg
)
19 def logger(self
) -> Optional
[Callable
[[str], None]]:
20 return self
._logging
_function
This page took 0.031029 seconds and 3 git commands to generate.