* morituri/result/result.py:

Add a Logger base class.
This commit is contained in:
Thomas Vander Stichele
2009-06-05 09:39:48 +00:00
parent 9a26d7f6a4
commit b63777ea62
2 changed files with 28 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2009-06-05 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/result/result.py:
Add a Logger base class.
2009-06-05 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:

View File

@@ -20,6 +20,10 @@
# You should have received a copy of the GNU General Public License
# along with morituri. If not, see <http://www.gnu.org/licenses/>.
import time
from morituri.result import logger
class TrackResult:
"""
@ivar testcrc: 4-byte CRC for the test read
@@ -58,3 +62,22 @@ class RipResult:
def __init__(self):
self.tracks = []
class Logger(object):
"""
I log the result of a rip.
"""
def log(self, ripResult, epoch=time.time()):
"""
Create a log from the given ripresult.
@param epoch: when the log file gets generated
@type ripResult: L{RipResult}
@rtype: str
"""
raise NotImplementedError
def getLogger():
return logger.MorituriLogger()