contenthandling/webrecognisers/Test/t_recogtest/crectestlogger.cpp
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "crectestlogger.h"
       
    17 
       
    18 _LIT(KTxtLogPath, "t_recog");
       
    19 _LIT(KTxtLogFilename, "t_recogtest.log");
       
    20 
       
    21 CRecTestLogger* CRecTestLogger::NewL()
       
    22 	{
       
    23 	CRecTestLogger* self = new(ELeave) CRecTestLogger();
       
    24 	CleanupStack::PushL(self);
       
    25 	self->ConstructL();
       
    26 	CleanupStack::Pop(self);
       
    27 	return self;
       
    28 	}
       
    29 	
       
    30 CRecTestLogger::~CRecTestLogger()
       
    31 	{
       
    32 	iLogger.CloseLog();
       
    33 	iLogger.Close();
       
    34 	}
       
    35 	
       
    36 CRecTestLogger::CRecTestLogger()
       
    37 	{
       
    38 	}
       
    39 	
       
    40 void CRecTestLogger::ConstructL()
       
    41 	{
       
    42 	User::LeaveIfError(iLogger.Connect());
       
    43 	iLogger.SetDateAndTime(ETrue, ETrue);
       
    44 	iLogger.CreateLog(KTxtLogPath(), KTxtLogFilename(), EFileLoggingModeOverwrite);
       
    45 	_LIT8(KTxtLogHeader, "Starting Application-Protocols Recogniser Tests...");
       
    46 	iLogger.Write(KTxtLogHeader());
       
    47 	}