Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm Sender: cygwin-apps-owner AT cygwin DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps AT cygwin DOT com Delivered-To: mailing list cygwin-apps AT cygwin DOT com content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: new logging structure for setup X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Sat, 4 May 2002 22:21:30 +1000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Robert Collins" To: "Cygwin-Apps" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g44CLcG31405 I've turned the global log() function into a C++ stream. For a new binary, the method LogSingleton::SetInstance() must be called with a concrete object to setup logging. After that, you can log with == log (LOG_TIMESTAMP) << "foo bar " << anInt << aString << endLog; == The log() and the endLog; are compulsory. You can also use the following syntax: log (LOG_TIMESTAMP) << "foo bar "; log (LOG_TIMESTAMP) << anInt; log (LOG_TIMESTAMP) << endLog; The current log() implementation now uses the LogSingleton implementation, which for setup.exe uses a concrete class LogFile. Once no code uses the old syntax, it will be removed. If you are building setup.exe code base using apps, LogFile may be appropriate if you are building a GUI app. It's probably not appropriate if you are not building a GUI app. Rob