Changeset 7c032b0 in rtems-tools for rtemstoolkit


Ignore:
Timestamp:
Oct 11, 2017, 7:09:52 PM (2 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
dc5de5f
Parents:
7f11670
Message:

rtemstoolkit: Add a capture hook to logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemstoolkit/log.py

    r7f11670 r7c032b0  
    5252#
    5353default = None
     54
     55#
     56# A global capture handler.
     57#
     58capture = None
    5459
    5560#
     
    8287        for l in text.replace(chr(13), '').splitlines():
    8388            print(l)
     89        lock.release()
     90    if capture is not None:
     91        lock.acquire()
     92        capture(text)
    8493        lock.release()
    8594
Note: See TracChangeset for help on using the changeset viewer.