lowlevellibsandfws/pluginfw/Test_Bed/test_bed/DefaultLogOutput.cpp
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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 // This file contains the implementation of the class CDefaultLogOutput
       
    15 // This file comment is for DOxygen only and is ignored by EDoc.
       
    16 // 
       
    17 //
       
    18 
       
    19 #include "DefaultLogOutput.h"
       
    20 
       
    21 CDefaultLogOutput::CDefaultLogOutput(const TDesC& aTitle) :
       
    22 iTitle(aTitle)
       
    23 	{
       
    24 	// Do nothing
       
    25 	}
       
    26 
       
    27 CDefaultLogOutput::~CDefaultLogOutput()
       
    28 	{
       
    29 	Close();
       
    30 	}
       
    31 
       
    32 void CDefaultLogOutput::OpenL()
       
    33 	{
       
    34 	// The directory where the log file will go
       
    35 	_LIT(KTestBedDirectory, "TestBed");
       
    36 
       
    37 	User::LeaveIfError(iFLogger.Connect());
       
    38 
       
    39 	iFLogger.CreateLog(KTestBedDirectory, iTitle, EFileLoggingModeOverwrite);
       
    40 	iFLogger.SetDateAndTime(EFalse, EFalse);
       
    41 	}
       
    42 
       
    43 void CDefaultLogOutput::Write(const TDesC& aOutput)
       
    44 	{
       
    45 	iFLogger.Write(aOutput);
       
    46 	}
       
    47 
       
    48 void CDefaultLogOutput::Close()
       
    49 	{
       
    50 	iFLogger.Close();
       
    51 	}
       
    52