Tests: add basic ust context tests for $app, vpid, vuid, vgid
[lttng-tools.git] / tests / utils / lttngtest / logger.py
CommitLineData
ef945e4d
JG
1#!/usr/bin/env python3
2#
3# Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4#
5# SPDX-License-Identifier: GPL-2.0-only
6
7from typing import Callable, Optional
8
9
10class _Logger:
11 def __init__(self, log: Optional[Callable[[str], None]]):
12 self._logging_function: Optional[Callable[[str], None]] = log
13
14 def _log(self, msg: str) -> None:
15 if self._logging_function:
16 self._logging_function(msg)
17
18 @property
19 def logger(self) -> Optional[Callable[[str], None]]:
20 return self._logging_function
This page took 0.026439 seconds and 4 git commands to generate.