def test_bad_endpoint(self): manager = LogManager( defaults=[LogManager.Route(None, Logger.Level.INFO, LogAdapter(), None)] ) logger = manager.get_logger("unit.test.log") logger.log(logger.Level.INFO, "Info message") self.assertFalse(self.stream.getvalue())
def setUp(self): super().setUp() uid = uuid.uuid4() self.path = pathlib.Path(self.locn.name, f"{uid.hex}.log") self.manager = LogManager( self.path, defaults=[LogManager.Route(None, Logger.Level.INFO, LogAdapter(), self.path)] ) self.manager.__enter__()
def setUp(self): self.stream = io.StringIO() self.stream.name = "test stream" self.manager = LogManager( defaults=[LogManager.Route(None, Logger.Level.INFO, LogAdapter(), self.stream)] )