Esempio n. 1
0
 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())
Esempio n. 2
0
 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__()
Esempio n. 3
0
 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)]
     )