First public contribution.
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
25 Log::Log(const char *aPrefix)
26 : iStream(0), iIndent(0), iPrefix(aPrefix)
31 void Log::SetStream(std::ostream *aStream)
37 std::ostream &Log::Stream()
40 if(!iStream) FatalError();
45 // Write the current indent level to the progress stream
46 void Log::WriteIndent()
49 if(!iStream) FatalError();
56 for(int i=0; i < iIndent; ++i)
63 // Increase indent level
69 // Decrease indent level
74 if(iIndent < 0) FatalError();
79 int Log::IndentLevel()
87 dbg << Log::Indent() << "Fatal Error - processing aborted" << Log::Endl();