Changeset 723b638 in rtems-source-builder


Ignore:
Timestamp:
Oct 27, 2017, 6:23:25 AM (19 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
910196d
Parents:
9b54dd8
git-author:
Chris Johns <chrisj@…> (10/27/17 06:23:25)
git-committer:
Chris Johns <chrisj@…> (10/27/17 06:26:26)
Message:

sb: Add a log capture interface to capture the console output.

  • Increase the tail logged to 400 lines.

Update #3210.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/log.py

    r9b54dd8 r723b638  
    11#
    22# RTEMS Tools Project (http://www.rtems.org/)
    3 # Copyright 2010-2012 Chris Johns (chrisj@rtems.org)
     3# Copyright 2010-2017 Chris Johns (chrisj@rtems.org)
    44# All rights reserved.
    55#
     
    3333#
    3434default = None
     35
     36#
     37# A global capture handler.
     38#
     39capture = None
    3540
    3641#
     
    7075        print(l, file = sys.stderr)
    7176        sys.stderr.flush()
     77    if capture is not None:
     78        capture(text)
    7279
    7380def output(text = os.linesep, log = None):
     
    8087            print(l)
    8188        sys.stdout.flush()
     89        if capture is not None:
     90            capture(text)
    8291    _output(text, log)
    8392
     
    105114class log:
    106115    """Log output to stdout or a file."""
    107     def __init__(self, streams = None, tail_size = 200):
     116    def __init__(self, streams = None, tail_size = 400):
    108117        self.tail = []
    109118        self.tail_size = tail_size
Note: See TracChangeset for help on using the changeset viewer.