Skip to content

Print log

Hans Fangohr requested to merge print_log into main

Provide a second logger which sends output to the stdout (=shell) and file at the same time, but doesn't apply any formatting (such as adding date, loglevel, etc).

Included is one example of how to use that.

There is also documentation added.

Handy sequence of test commands:

    log = logging.getLogger('')
    log.info("Test 123")
    import time
    time.sleep(1)
    
    plog = logging.getLogger("print")
    plog.info("This is a test.")
    time.sleep(1)
    
    log.debug("Test (DEBUG)")
    log.warning("Test (warning)")
    time.sleep(1)

    plog.warning("Another print")
Edited by Hans Fangohr

Merge request reports

Loading