Example #1
0
def test_retrievelog():
	"""
	Test getting log by name.
	"""
	lgr = simplelog.make_logger (name='mytestlog')
	lgr.info ("what?")
	import logging
	lgr2 = logging.getLogger ('mytestlog')
	assert (lgr == lgr2), "loggers are not identical"
Example #2
0
def test_filelog():
	"""
	Test logging to file.
	"""
	lgr = simplelog.make_logger (handler='test/out/test.log')
	lgr.info ("what?")
Example #3
0
def test_defaultlog():
	"""
	Test the simplest case of logging.
	"""
	lgr = simplelog.make_logger()
	lgr.info ("what?")